No matter how much you talk about networking it is inexhaustible like the ocean.

I wish to dwell a little bit on routing, DHCP, NAT and topology.

Yesterday I wanted to talk about routing but there was no space.

Routing is separate from packet forwarding which is what is thought of
as routing for
 the most part.

Routing of packets on the Internet in which packets go from hop to hop,


$ traceroute -n gmail.com
traceroute: Warning: gmail.com has multiple addresses; using 74.125.236.214
traceroute to gmail.com (74.125.236.214), 64 hops max, 40 byte packets
 1  192.168.1.1  3.388 ms  2.473 ms  2.232 ms
 2  59.99.242.1  22.239 ms  21.721 ms  21.981 ms
 3  218.248.168.182  40.735 ms  104.231 ms  27.973 ms
 4  59.163.206.157  146.493 ms  155.239 ms  156.976 ms
 5  121.240.1.46  158.730 ms  159.234 ms  165.248 ms
 6  72.14.232.110  165.950 ms  167.731 ms  167.978 ms
 7  209.85.240.147  168.225 ms  168.1 ms  158.985 ms
 8  74.125.236.214  159.211 ms  157.718 ms  154.737 ms

shows how you get to a place from here.

This is actually packet forwarding performed by various routers which
is machines with
 multiple physical interfaces and consequently multiple IP addresses.

In fact the only way by which you can send off packets from one place
to another involves
 definitely routing or bridging.

This happens in layer II or III.

But essentially routing is the process of finding out which interface
to push the packet.

It is like asking in a hotel, which table placed the order?

But the procedure of route lookup involves a separate routing protocol
like BGP, OSPF, RIP or
even static routes.

You can create a lot of static routes using the route command on Linux.

Once the route tables are setup the kernel looks up the table to
forward the packet appropriately.

Here we have the chicken and egg problem, BGP is over TCP, OSPF is
over IP and so on.

You need a way to talk to each other before the routing protocols do their job.

So essentially it is a mix of many different techniques.

Now let us look at DHCP.

A home router/MODEM has a DHCP server built into it.

This is what enabled you to have multiple computers talk to the
Internet at home.

You can do that without DHCP also but this makes is incredibly convenient.

Dynamic Host Configuration Protocol enables you to assign IP addresses
based on MAC hardware
 addresses or even randomly and a lease period is assigned for which
the gateway, nameserver and
 so on are fixed.

Typically the Internet MODEM talks PPPoE  to the phone line, DHCP to
you and does NAT.

When you type:

# dhclient eth0

what happens is that your PC requests a DHCP server to respond using
Ethernet broadcast.

Since your MODEM is listening for broadcast packets it will respond.

This can easily happen over WiFi too.

Now what is NAT?

NAT of network address translation is a method to allow your DHCP
local addresses, RFC1918 addresses
 to talk to the Internet using the unique globally recognizable public
IP of your MODEM which is
 negotiated as part of PPPoE.

It is simple packet header rewriting logic. Sometimes port numbers are
also rewritten.

Let me finish up the mail by talking about network topology.

Normally the computers in the same WiFi network or LAN which is
ethernet based will be
 in the same subnet or same network. This is a bus topology.

In other words each node in the network that is physically connected
and can talk the same
 layer II protocol like CSMA/CD belong to the same IP network as well.

However this can also be extended across the Internet using VPN using
the tun/tap interface
 in which your local layer II concepts like DHCP or bridging can work
across the Internet.

But in general the physical topology dictates which network your
computer belongs to.

Also once you connect to the Internet the network keeps getting more
and more specific and finally
 it goes into a different network.

More later.

-Girish
-- 
Gayatri Hitech
http://gayatri-hitech.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to