Network Configuration

You might also like

You are on page 1of 36

Network Configuration

An Introductory Tutorial

Network Parameters


The following are common parameters that need to be set in a networked computer:


DNS Servers (e.g. 137.207.32.32)




The logical (e.g. IP) address of the DNS servers to be used to resolve domain names These can be local (e.g. frankie.csfac8.uwindsor.ca) or remote (e.g. www.google.ca) This includes the computers name (e.g. elvis) and the domain on which it resides (e.g. csfac8.uwindsor.ca)

Host and domain information




Network Parameters


Logical address (e.g. IP address: 137.207.132.21)




This address is required to participate on a WAN, such as the Internet This is the binary mask that should be used to extract the network and subnet information from the hosts address This is the logical (e.g. IP) address of the router which should receive the hosts Internet-bound packets

Subnet mask (e.g. 255.255.0.0)




Default gateway (e.g. 137.207.32.2)




All of these values would be given to a computers user by a network administrator

DNS Servers


DNS servers use the DNS protocol to determine the logical (e.g. IP) address of a host, given its domain name


e.g. www.google.ca: 64.233.167.99

Many servers are given (in a specific order) so that local DNS servers are first


This is because the main DNS servers (Internic) would not know local domain names


e.g. An Internic server would know about uwindsor.ca, but not frankie.csfac8.uwindsor.ca)

These server addresses would usually be wellknown

Host and Domain Info




Host name:


This is the name of the host on the network




e.g. elvis

Domain name:


This is the name of the domain on which the host resides




A domain is a named group of computers, which may correspond to a subnet of addresses

e.g. csfac8.uwindsor.ca refers to the LAN on the 8th floor of Lambton Tower

Given these two pieces of information, the hosts DNS name would be elvis.csfac8.uwindsor.ca


Depending on the operating system, the domain may require that you log on first

The network admin will create one or more domains, but each hosts user can determine the host name, provided it is unique

Logical Address
 This


is typically an IP address

This address is necessary for all WAN (including Internet) communication  Routing uses the logical address for finding the path for packets
 These


addresses are normally assigned automatically by a DHCP/BOOTP server


They can be random addresses on the network, or sequentially assigned

Subnet Mask
 The

subnet mask that it used by the host is the same subnet mask used by the nearest routers


e.g. If using 2-level subnetting of 2 and 3 bits, this mask would be the last subnet mask used (137.207.248.0)

A

network admin would know the subnet masks he/she assigned to each network

Default Gateway


The default gateway (router) is the router to which all Internet-bound traffic should be sent
 

Typically, a LAN will have exactly one router, and this will be its address If there is more than one router, and only one leads to the Internet, the Internet-connected routers address is used here If there is more than one router that connects to the Internet, either address could be used

The network admin would know the address of the routers

Troubleshooting Networks
How to Determine Network Configuration or Hardware Problems

Troubleshooting
A

network admins job is not just to set up a network, but maintain it




Thus, if anything goes wrong, the admin should track down the problem somehow
The problem may be a configuration error, which the admin should fix  The problem may be a hardware failure, which can only be fixed by repairing or replacing the hardware



Nevertheless, the admin must determine which hardware has failed, so this can happen

A Typical Scenario
A

user calls up the network admin, saying their network connection is down
For most non-technical users, even this clear of a statement of the problem might not be possible  A network admin will eventually figure at least this much out from the users comments


Step 1: Test Local Connectivity




First, an admin will try to connect to a local computer This could mean DNS servers are unavailable


cmd% ping frankie.csfac8.uwindsor.ca ping: unknown host frankie.csfac8.uwindsor.ca

The admin should check the DNS server addresses, and the servers

Next, the admin will make sure the IP address works

cmd% ping 137.207.140.93 Destination host unreachable. Destination host unreachable. Destination host unreachable.

This could mean no connectivity


 

The admin should check the configuration settings (ipconfig, netconfig, networkadmin) However, if the ping command responds from a router that a host is unreachable, the node may actually be unreachable, or the address may not be bound


Obviously, we have connectivity since the router sent a message to us

How Ping Works


 Ping

works by sending an ICMP Echo Reqest to the destination  The destination sends back an ICMP Echo Reply to the host  The host records the round trip time, and repeats the process a few times

A Problem With Ping


 ICMP


Echo Requests are often disabled in some networks


This is due to denial of service attacks that use ICMP Echo Request/Reply

 In

these networks, ping will not work

Check Configuration Settings


In Windows (2000/XP): C:\> ipconfig

(success) Windows IP Configuration Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : csfac8.uwindsor.ca IP Address. . . . . . . . . . . . : 192.168.137.71 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.137.2 (failure) Windows IP Configuration Ethernet adapter Wireless Network Connection: Media State . . . . . . . . . . . : Media disconnected

Edit Configuration Settings




In Windows (2000/XP), editing your network configuration settings can be done from TCP/IP properties
   

Open control panel, select Network Connections Select your connection, click Properties Select Internet Protocol (TCP/IP), click Properties From here you can edit your configuration settings manually, or specify that a DHCP should provide the values for you

Check/Edit Configuration Settings


 In

Linux: Linux% network-admin  In Solaris: Solaris% netconfig


 These

bring up a graphical dialog where configuration can be viewed and edited

Step 2: Test Remote Connectivity


 First,

an admin will try to connect to a local computer could be a routing problem

cmd% ping www.google.ca ping: unknown host www.google.ca

 This
 

Most likely the routing problem is within the organization The network administrator should check the route using the traceroute (traceroute, tracert) command

Testing Routes


The traceroute command can give the logical addresses of each router in a route


It may also tell you if there is a problem with the route

In Windows (2000/XP): tracert www.google.ca




In Linux/Solaris: traceroute www.google.ca




Windows Tracert Output


C:\>tracert www.google.ca Tracing route to www.l.google.com [66.102.7.104] over a maximum of 30 hops: 1 1 ms 1 ms 1 ms 192.168.1.1 2 23 ms 16 ms 20 ms 10.71.96.1 3 11 ms 13 ms 13 ms d226-4-1.home.cgocable.net [24.226.4.1] 4 30 ms 15 ms 18 ms cgowave-0-157.cgocable.net [24.226.0.157] 5 30 ms 17 ms 17 ms cgowave-0-101.cgocable.net [24.226.0.101] 6 29 ms 18 ms 17 ms gw-google.torontointernetxchange.net [198.32.245.6] 7 19 ms 37 ms 17 ms 66.249.94.75 8 44 ms 23 ms 31 ms 64.233.175.96 9 53 ms 40 ms * 64.233.175.96 10 98 ms 92 ms 86 ms 66.249.95.215 11 98 ms 89 ms 94 ms 216.239.49.142 12 88 ms 95 ms 90 ms 216.239.49.142 13 104 ms 98 ms 89 ms 216.239.49.142 14 99 ms 94 ms 88 ms 66.102.7.104 Trace complete.

Windows Tracert Output


The output contains lines like the following: 5 30 ms 17 ms 17 ms cgowave-0101.cgocable.net [24.226.0.101]


5: The 5th hop 30,17,17ms: Round trip times to/from the router cgowave-0-101.cgocable.net [24.226.0.101]: The domain name and address of the router

Linux traceroute Output


rfortier@elvis:~ $ traceroute www.google.ca traceroute: Warning: www.google.ca has multiple addresses; using 64.233.167.147 traceroute to www.l.google.com (64.233.167.147), 30 hops max, 38 byte packets 1 ssr68 (137.207.140.65) 0.395 ms 0.302 ms 0.250 ms 2 ssr (137.207.140.66) 0.597 ms 0.508 ms 0.472 ms 3 cs-ssr-main.newcs.uwindsor.ca (137.207.76.254) 1.038 ms 0.901 ms 0.692 ms 4 passport1.uwindsor.ca (137.207.32.1) 1.701 ms 1.245 ms 1.225 ms 5 internet.uwindsor.ca (137.207.92.14) 1.434 ms 1.136 ms 0.967 ms 6 acs7204.uwindsor.ca (137.207.232.3) 2.494 ms 1.563 ms 1.852 ms 7 f0-1.na03.b011027-0.yyz01.atlas.cogentco.com (38.112.19.97) 10.358 ms 10.811 ms 9.377 ms 8 g9-1.core01.yyz02.atlas.cogentco.com (66.28.66.53) 10.628 ms 9.289 ms 10.427 ms 9 p15-0.core01.yyz01.atlas.cogentco.com (154.54.2.221) 10.265 ms 15.687 ms10.139 ms 10 p13-0.core02.ord01.atlas.cogentco.com (66.28.4.213) 24.619 ms 24.274 ms 25.259 ms 11 p15-0.core01.ord01.atlas.cogentco.com (66.28.4.61) 24.502 ms 23.292 ms 24.221 ms 12 p6-0.core01.ord03.atlas.cogentco.com (154.54.2.238) 24.316 ms 24.378 ms 24.401 ms 13 google.ord03.atlas.cogentco.com (154.54.11.186) 22.021 ms 22.070 ms 21.698 ms 14 66.249.94.193 (66.249.94.193) 22.524 ms 22.307 ms 66.249.94.195 (66.249.94.195) 24.050 ms 15 64.233.175.38 (64.233.175.38) 26.037 ms 64.233.175.42 (64.233.175.42) 64.185 ms 64.233.175.38 (64.233.175.38) 25.547 ms 16 64.233.167.147 (64.233.167.147) 23.303 ms 24.924 ms 22.002 ms

How To Interpret the Output


 The


round trip times can tell you if there is a problem


A round trip time of * means a timeout has occurred, which is a definite problem  A round trip time > 500 ms usually means there is a problem with that router


The router could be dropping packets (due to overloaded buffer or routing loops typically)

How Does Traceroute Work?




Traceroute sends either a UDP or ICMP Echo packet to the destination




Initially, the hop limit is set to 1, which causes the first router to drop the packet


 

Routers, however, will respond with an ICMP Time Exceeded error message, which contains the routers IP address The process is repeated a few times to get a few round trip times The domain name of the IP address is found (for convenience of the network admin) Then 3, 4, etc. until the destination host is reached

Next, the process is repeated with a hop limit of 2




A Problem with Traceroute




One problem with traceroute is that it could read a false path




If the routers reconfigure (e.g. due to congestion) during its execution, the readings could be inaccurate

A1

A2

A2

S
B2 B2

A Problem with Traceroute




One problem with traceroute is that it could read a false path




If the routers reconfigure (e.g. due to congestion) during its execution, the readings could be inaccurate
1 A1

A1

A2

A2

S
B2 B2

A Problem with Traceroute




One problem with traceroute is that it could read a false path




If the routers reconfigure (e.g. due to congestion) during its execution, the readings could be inaccurate
1 2 A1 A2

A1

A2

A2

S
B2 B2

A Problem with Traceroute




One problem with traceroute is that it could read a false path




If the routers reconfigure (e.g. due to congestion) during its execution, the readings could be inaccurate
1 2 A1 A2 D

A1

A2

A2

S
B2 B2

A Problem with Traceroute




For networks with ICMP Echo Request/Reply disabled, the UDP format must be used


Some traceroute commands do not support the UDP message format, however

LAN Setup
10BaseT Ethernet 802.11g Wireless

10BaseT Ethernet Setup




To connect a 10BaseT Ethernet network:


 

Install a network interface card (NIC) into each computer (host) Connect each NIC to a hub or switch, using unshielded twisted pair (UTP) cabling Every frame received by a hub is reproduced on all of its ports Every frame received by a switch is examined, and the correct port is determined for the frame A Cable/DSL also provides network address translation (NAT)

Hub:


Switch (or Cable/DSL Router):


 

802.11g Wireless Setup


 To


setup a 802.11g wireless network:

Install an 802.11g (or 802.11b) NIC into each host  Plug a wireless router or base station into your Internet connection (e.g. cable modem)  Configure the SSID and security protocols on the wireless router and each of the NICs


e.g. WPA encryption, and specify the key

Ad Hoc Wireless Networks


 If

you have only a few hosts (2-3), you can create an ad hoc network
This type of network does not have a base station (or wireless router)  The hosts communicate directly with one another


Wireless Networks Comment


A

wireless network connection is often not useful for a desktop PC


For this reason, wireless routers typically contain a few Ethernet ports  It is typical to have desktop PCs wired, and notebooks and PDAs will have wireless



e.g. Notebooks with 802.11g and PDAs with 802.11b

 Wireless

networks will be discussed in depth later

Packet Sniffers


Packet sniffers are a useful tool for exploration of networking




They can also be used by network programmers to diagnose packet format errors This includes the header information e.g. Wireless, Ethernet, TCP/IP, HTTP Ethereal (Linux/Mac/Windows, multi-protocol) TCPDump (Linux/Windows, TCP/IP) Kismet (Linux, wireless)

They typically examine many protocols


 

Some common packet sniffers are:


  

Ethereal Tutorial


Here is how to sniff packets using Ethereal:


    

Start Ethereal Select the correct network interface Start capturing packets, stop when done Select a packet from the list Examine the packet hierarchy and header information, such as:
   

Ethernet or wireless frame headers IP datagram headers TCP datagram headers SMTP message

You might also like