| Network: Nic Setup |
|
|
|
|
HowTo Configure a network card in Suse/openSUSE 10, 11 for LAN and Internet Access. This is a story told in screenshots, about configuring network interfaces in Yast. It's for fixed networks e.g. a SOHO LAN (where a Network manager is not appropriate). If you frequently switch between networks you should use a Network Manager rather than the GUI in Yast. Here are some of the focus areas:
I'm in a hurry, just tell me which pictures to use.
IP Addressing: The majority of Suse installations that use network interfaces to connect to the internet, do so through a cable modem or a DSL/ADSL modem, sometimes through a router. These devices are set to "serve" or allocate IP addresses from internal DHCP servers to workstations as they boot up and come on line. These are called "dynamic IP addresses". They are the do-nothing default way of getting an IP address. Suse's default installation assumes your workstation has a network interface that's connected to a DHCP server (e.g. router or modem) and thus it will likely receive its first IP address dynamically. If your workstation is also a Server that maintains a network-wide service like Print Server or File Server etc, you would be well advised to give it a fixed IP address. Indeed the Administrator of a network where all IP addresses are fixed is much advantaged. Dynamic IP Setup I - The Suse/openSUSE Defaults. Pics 1 to 6 inclusiveThis is what you get when you install the operating system and accept all defaults. When it breaks or when you change/add a network interface, this section will lead you back to the excellent default configuration. Open Yast --> Network Devices --> Network Card and the "Overview" screen displays: Two network interface cards are displayed in this screenshot, a wireless NIC and an on-board NIC. The details for whichever NIC you highlight are displayed in the lower gray panel. The "Global" Tab sets some miscellaneous parameters. Under "Hostname/DNS" you can name the card (hostname) for Linux networking and allocate a pointer to the Domain Name Server where IP addresses are resolved from domain names. The "Router" Tab allows you to point to the device that provides the gateway to the internet. It doesn't matter which interface/NIC is highlighted at this stage because the other three Tabs, Global, Hostname/DNS and Router set parameters that apply to all cards that are listed here. First consider the "Global" options: Network Setup Method: Knetworkmanager can be a bit Kantankerous with wireless cards. There are fine alternatives like the Gnome-applet and wifi-radar. NetworkManager-gnome RPM is great for Gnome and Andrewd18 provides the RPM for wifi-radar to replace Knetworkmanager in KDE. I use and recommend IFUP if you're not using roaming wireless networks. IPv6 Protocol Settings: IPv6 is not yet in wide use. We nearly exclusively use IPv4. Leave IPv6 disabled for the present. If it's active it can badly degrade your web browsing by delaying page loads. DHCP Client Options: Generally leave these alone; you see here the defaults. Next activate the "Hostname/DNS" Tab to set networking names and name resolvers. The hostname and domain name are first set during openSUSE's installation. The hostname is written to the file /etc/hosts as a fundamental identifier of this workstation in Linux networking. Long ago machines on the Internet were only reachable via the list of IP addresses and matching names in the /etc/hosts file. The domain name can be a full domain name like "www.swerdna.org" or a workgroup name like "swerdna". Leave the x-marks in "Change Hostname via DHCP" and in "Write Hostname to /etc/hosts". You won't see (except perhaps faintly underneath the gray) the blue writing that I've added to show what's going on behind the scenes. If you have a LAN, however small, even just one workstation, the software will seek out the real Name Servers supplied by your ISP through the Gateway, which in this example is at 192.168.2.1 in a router. Even though you might not see it, you will "Update DNS via DHCP" should that be available. In this modern way the /etc/hosts file is superseded as your primary Internet Name Resolver. Next we have the "Routing" Tab: This is the place to identify the route to the internet, most often called the "Gateway". When the IP address is served from a DHCP server, the server is usually but not necessarily associated with a hardware device that leads to the internet. As a result the gateway is already known through programming in the software associated with the DHCP client and it's not necessary to put anything here. Here you see the openSUSE defaults for a standard DHCP setup. In release 10.2 this panel is locked when addressing is set to DHCP but open in the other releases. That completes the broad network settings that apply to all network interfaces. Now return th the "Overview" Tab where you can highlight particular cards and activate Yast's "Configure" Module for individual cards. Revisit Pic 4 and activate "configure" to get this screen: In this GUI you can switch from dynamic addressing to fixed IP addressing. The information in blue is required (and frequently supplied automatically) for first time configuration of cards. When re-configuring from fixed IP to DHCP and vice versa the device type and configuration name will be grayed out. The "Hardware" Tab is usually a non-event for workstations or SOHO LANs. For the sake of completeness I've linked here the (blank) default configuration. Now move to the "General" Tab to set the last few parameters. The panel in Pic 6 will open up Device Activation: Usually this is set to "At Boot Time" to use the card straight away. A removable interface may be configured to activate "On HotPlug". If you have more than one interface, typically a wireless interface as well as a wired interface in a typical SOHO LAN, NOTE that you cannot successfully have two active cards on the same subnet in the same machine; e.g. 192.168.2.7 and 192.168.2.80 won't do. So you would configure one to activate at boot and the other to activate as required; e.g. "On Cable Connect", "Manually" or "Never". Firewall Zone: Network cards are set in the firewall's external zone for the standard SOHO LAN. FYI the single workstation using a broadband A/DSL or Cable modem is on a (very small) LAN so even for it the NIC should be in the external zone. You might see ill informed advice in Forums to set the SOHO NIC to the Internal Zone to reduce networking difficulties. If you do that on a SOHO LAN you effectively cut out the firewall and make it useless. When I'm setting up a NIC or varying anything in my network I simply turn my firewall off until I'm satisfied the change is effective. Then I turn the firewall back on and see whether I need to make a configuration change to the firewall to accommodate the network reconfiguration. Dealing with NICs and firewalls concurrently is so much more complicated that dealing with them consecutively. Enable Device Control for Non-root user via Kinternet: That's almost self-explanatory. Maximum Transmission Unit: MTU sometimes needs to be varied for some routers or switches. Generally it should be left alone. If you want o see the MTU of a device then issue this root shell command: ifconfig. In summary, for the default DHCP configuration use Pics 1 to 6 inclusive. Dynamic IP Setup II - Manually set Gateway & Name Resolution.
|




