TimeLinux1

Wednesday, February 23, 2011

Linux: CIDR - Classless Inter Domain Routing

-cidr    - classless inter domain routing is a direct extension of subnetting.
-cidr is also called supernetting.
-cidr is called supernetting as it allows big n/w to be converted into many smaller n/w for purpose of routing.

-nat or network address translation is a system that is run on the border router of a network.
-nat intercepts packets and rewrites their addresses and ports to different ones.
-this rewriting is done using a table of mappings between external and internal address/port pairs.
-nat allows several internal hosts of a network to share one common external address. This conserves ipv4 addresses.

-ipv6 addresses always has the boundary between n/w and host portion set at /64.
-This means network addresses are always64 bits slong.

-routing is the process of directing a packet through the maze of networks en route to the destination.
-routing = ip forwarding
-routing happens because of rules or routes stored in a table in the kernel.
-routing rules take the packet one hop closer to the destn.
-if the kernel finds no relevant route it tries the default route.
-if the default route fails, the kernel sends a 'nettwork unreachable' icmp error to the sender.
-kernel routing table can be seen using the foll:
    . netstat -nr    or    netstat -r
-route can be added/deleted using the foll:
    . route add or route del

-arp    - address resolution protocol, translates ip addresses to h/w addresses.
-it can run on any network that supports broadcasting, usually ethernet.
-since arp uses broadcast packets, which cannot cross networks, it can only be used to find h/w addr of directly conn hosts.
-machines maintain a cache of addresses recently found. This cache can be seen using 'arp -a' cmd.
-to see current h/w addr, use 'arp' cmd or 'ifconfig' cmd.

No comments:

Post a Comment