CIT 06204 Linux - 6 - Network Configuration
CIT 06204 Linux - 6 - Network Configuration
CIT06204 Linux_UNIX
1
Chapter Contents
6.1 Network Interface
6.2 Host Information
6.3 Stop and Start Networking
6.4 Routing
6.5 TCP dump
6.6 Ethereal
6.7 Traceroute & Tracepath
2
6.1 Network Interface
• NIC must be supported by the kernel.
• NIC information can be obtained using the
command dmesg.
• This command can reveal the following
detail:
Chipset type
I/O Address
IRQ #
3
6.2 Host Information
• The files below store network information:
• /etc/resolv.conf has a list of DNS servers
Nameserver 192.167.1.107
Nameserver 192.167.1.1
4
Host Information
• /etc/sysconfig/network defines if networking must be started
• Also contains the HOSTNAME variable
NETWORKING=yes
HOSTNAME=mesa.domain.org
GATEWAY=192.167.1.1
GATEWAYDEV=
6
6.4 Routing
• The routing tables are configured, checked and changed
using /sbin/route tool.
• Routing examples:
• Add a startic route to the network 10.0.0.0 through the
device eth1 and use 192.167.1.107 as the gateway for
that network.
/sbin/route add –net 10.0.0.0 gw 192.167.1.107 dev eth1
• Add a default gateway
/sbin/route add default gw 192.167.1.1 eth0
7
6.5 TCP dump
• tcpdump is a network sniffing (capturing) tool
• Only root user can execute tcpdump
• Listens on a network interface for all activities on
the same subnet.
$tcpdump: prints everything it listens on a network
$tcpdump -q: prints less protocol information
$tcpdump host/ip_address
Prints packets destined for host/ip_address
8
6.6 Ethereal
• Ethereal is a network protocol
analyzer
• Ethereal is a GUI based application
$/usr/bin/ethereal &
Starts the ethereal
& puts the job in background
Will ask to enter root password
9
6.7 Traceroute & Tracepath
• Traceroute traces a path of a packet
to the destination
• Similar to tracert in Windows
• Tracepath is similar to traceroute
but gives slightly different result.
$traceroute hostname/ipp_address
$tracepath hostname/ipp_address
10