Objectives
Upon completion of this unit, you should be able to:
- configure IP interfaces- setup routes- understand name resolution- setup IPv6
Network Interfaces
1) Networking scripts refer to logical interface names:
- Enthernet: eth0, eth1 …- Dial-up: ppp0, ppp1 …- Loopback: lo
2) Display network interfaces by using:
- ifconfig –a- ip link [show]
Driver Selection
1) All drivers for network interface cards built as modules
2) /etc/modprobe.conf maps logical names to specific modules:
alias eth0 3c59x
3) Secondary “card selection” can be specified in the interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth0
HWADDR= 00:0D:60:FB:CA:61
Speed and Duplex Settings
1) Modules are configured to autonegontiate, by default
2) Mismatched can cause intermittent to no communication
3) Manually override using:
- ethtool- ETHTOOL_OPTS in ifcfg-ethX- options or install in /etc/modprobe.conf for older interface modules
IPv4 Addresses
1) View configuration with:
- ifconfig- ip addr [show]
Dynamic IPv4 Configuration
1) Interface configuration defined in:
- /etc/sysconfig/network-scripts/ifcfg-ethX- Dynamic with line of: BOOTPROTO=dhcp
2) Zero Configuration Networking
- Uses 169.254.0.0/16- Disabled with line of: NOZEROCONF=yes in /etc/sysconfig/network-syscripts/ifcfg-ethX
3) Use ifdown device; ifup device to apply configuration changes
Static IPv4 Configuration
1) Interface configuration defined in: /etc/sysconfig/network-scripts/ifcfg-ethX
2) Static with lines of:
BOOTPROTO=noneIPADDR=10.0.0.1NETMASK=255.255.255.0
Device Aliases
1) Useful for virtual hosting
2) Bind multiple IP addresses to a single NIC
eth1:1eth1:2eth1:3
3) Create a separate interface configuration file for each device alias:
ifcfg-ethX:xxxMust use static networking
Routing Table
1) Defines path to all system
2) View table with:
- route- netstat –r- ip route [show]
Default Gateway
1) Used when no route entry is matched
2) Might be obtained dynamically with DHCP
3) Can be statically configured:
- With a line of: GATEWAY = 10.53.0.254- Globally in: /etc/sysconfig/network- OR, per interface in the interface configuration file: /etc/sysconfig/network-scripts/ifcfg-ethx
Configurating Routes
1) To control traffice flow when there is more than one router
2) Static routes defined per interface
- /etc/sysconfig/network-scripts/route-ethX- Uses ip route add syntax
3) Dynamic routes learned via daemon(s)
- quagga- Support for various forms of RIP, OSPF, and BGP
Verify IP Connectivity
1) Ping
- Network packet loss and latency mesurement tool
2) traceroute
- Display network path to the destination
3) mtr
Defining the Local Host Name
1) View/Set local hostname with hostname
2) Initially defined in /etc/sysconfig/network:
- HOSTNAME= stationX.example.com
3) Might “pull” name from network
- dhcpclient daemon- "Reverser DNS lookup”
Local Resolver
1) Resolver performs forward and reverse lookups
2) /etc/hosts
- Local database of hostname to IP address mappings- Useful for small isolated networks- Normally, checked before DNS
Remote Resolvers
1) /etc/resolv.conf
- Domains to search- Strict order of name servers to use- May be updated by dhclient
2) /etc/nsswitch.conf
- Precedence of DNS versus /etc/hosts
Verify DNS Connectivity
1) Verify name servers using:
- nslookup (deprecated)- host- dig
Network Configuration Utilities
1) system-config-network
- system-config-network-gui- system-config-network-gui
2) Profile Selection
- system-config-network-cmd- netprofile kernel argument
Transparent Dynamic Configuration
- NetworkManager service- nm-applet
Implementing IPv6
1) Kernel ipv6 module enables stateless autoconfiguration
2) Additional configuration implemented by /etc/rc.d/init.d/network initialization script
- NETWORKING_IPV6=yes in /tec/sysconfig/network- IPV6INIT=yes in /etc/sysconfig/netowrk-script/ifcfg-ethX
IPV6: Dynamic Interface Configuration
1) Two ways to dynamically configure IPv6 addresses:
Router Advertisement Daemon- Runs on (Linux) Default Gateway – radvd- Only specifies prefix and default gateway- Enabled with IPV6_AUTOCONF=yes- Interface ID automatically generated based on the MAC address of the system
2) DHCP version 6
- dhcp6s supports# more configuration options- Enabled with DHCPV6C=yes
IPv6: StaticInterface Configuration
1) /etc/sysconfig/network-scripts/ifcfg-ethX
- IPV6ADDR=<ipv6_address>[/prefix_length]- Device aliases unnecessary…- IPV6ADDR_SECONDARIES=<ipv6_address>[/prefix_length][…]
IPv6: Routing Configuration
1) Default Gateway
- Dynamically from radvd or hhcpv6s- Manually specified in /etc/sysconfig/networkIPV6_DEFAULTGW=<IPv6_address [%interface]>IPv6_DEFAULTDEV=<interface> –only valid on point-to-point interfaces
2) Static Routes
- Defined per interface in/etc/sysconfig/network-scripts/route6-ethXuse ip –6 route add syntax<ipv6_network/prefix> via <ipv6_routeraddress>
New and Modified Utilities
1) ping6
2) traceroute6
3) tracepath6
4) ip –6
5) host –t AAAA hostname6.domain6
End of Unit8
1) Questions and Answers
2) Summary
- Where are drivers linked to specific interfaces?- Where is a static IP address defined?- Where is the default route set?- Where is the list of nameservers stored?