0% found this document useful (0 votes)
15 views10 pages

CIT 06204 Linux - 6 - Network Configuration

Uploaded by

musomicatherine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

CIT 06204 Linux - 6 - Network Configuration

Uploaded by

musomicatherine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 10

DIPLOMA IN CIT

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

• /etc/hosts contains your PC IP address &


known hosts
127.0.0.1 localhost localhost.localdomain
192.167.1.107 mesa mesa.domain.org
192.167.1.119 pico

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=

• /etc/sysconfig/network-scripts/ifcfg-eth0 has configuration


parameters for eth0
DEV=eth0
BOOTPROTO=none
BROADCAST=192.167.1.255
IPADDR=192.167.1.107
NETWORK=192.167.1.0
ONBOOT=yes
USERCTL=no
5
6.3 Stop and Start
Networking
• The main tool used to bring up the network interface is
/sbin/ifconfig
• Another tool is /sbin/ifup
• Example: Using ifconfig
/sbin/ifconfig eth0 192.167.10.1 netmask 255.255.127.0
/sbin/ifconfig eth0 down
• /sbin/ifconfig eth0 up
• Example: Using ifup
/sbin/ifup eth0
/sbin/ifup ppp0
/sbin/ifdown eth0

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

• Listing the kernel routing table


/sbin/route -n

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

You might also like