Computer Networks 0000
Download
Report
Transcript Computer Networks 0000
Computer Networks
0110-IP
Gergely Windisch
[email protected]
IP Address
•
•
•
•
•
Why do we need addresses?
How IP addresses look like
IP Classes (sorta’)
Addressing modes – unicast, multicast, broadcast
ARP – connecting physical and logical addresses
– RARP – doing the same but the other way around
• Private IP addresses
• Classless inter-domain routing (CIDR)
• DHCP – configure network parameters
automatically
Routing
•
•
•
•
•
Direct and indirect data transfer
Connecting networks
routing, routers
transmission control protocols
MPLS -
IPv6
• Similar, only better
Store and forward packet switching
• Packets are transferred from source to destination
through routers along the way. Packet is stored until
it is fully received (cheksummed and everything)
– Once it is received it is forwarded to the next hop
Network layer
• Connectionless or connection oriented?
• Connectionless
– treat each packet individually
• Connection oriented
– create virtual circuit
Connectionless
Connection oriented
Comparison
Comparison
• Setup time vs. routing time
• Connection oriented may be useful for VPN, or
other long term connection
Routing algorithms
• Routing algorithm decides where (which port) an
outgoing packet should be sent to
• Routing vs forwarding
– forwarding is the actual act of sending the package
– routing is the algorithm that fills/updates the table that
is used with the forwarding
• Routing algorithms
– nonadaptive (static) routing
• routing table is filled in advance without any consideration to
changes
– adaptive (dynamic) routing
• routing table is calculated on the fly
Routing algorithms
• Shortest path
– shortest path is selected
• Flooding
– all incoming packages are sent out to all ports
• Distance vector routing
– distance vectors to all other routers are kept
• Link state routing
Routing algorithms (2)
• Distance vector routing
– count to infinity problem
• bad news travels slowly - when router A is gone, router B (in
(b) - line 3) still thinks that it can reach it via C in 3 hops
Network layer in the Internet
Network layer in the Internet
• IP (Internet Protocol)
– provide a best effort transportation from source to
destination without any consideration as to whether the
machines are on the same network or on very different
networks
IPv4 datagram
Some IP options
IP Addresses
• IP address identifies network interface, not host
• Hierarchical address
– prefix – network id
– host id
• Hierarchy makes routing simpler
– routing tables need only store the networks, not the
individual machines
IP address
Subnet / CIDR
• Subnets help create smaller networks
• CIDR (classless interdomain routing) helps define
larger networks
Subnet
• There may come a time when multiple departments
of a university will want to get on the internet
• They already have a /16 address, so the options
would be
– put all the departments in one network (142.124.0.0)
• not so good
– buy new IP ranges at Walmart* (142.125.0.0, ..126….
..127….. and so on)
• works, but costs a lot and wastes a whole bunch of IP
addresses along the way
– Enter Subnets
*: Not really at Walmart at all
Subnets
CDIR
• Many networks -> lots and lots of lines in the
routing tables
– computers and routers in an organization have default
gateways - some routers on the network don't.
• Enter route aggreagation
Route aggreagation example (1)
Route aggreagation example (2)
Classful IP addressing
Special addresses
Addressing modes
• Unicast
• Multicast
• Broadcast
Private IP addresses
•
•
•
•
•
Anyone can use them, but
no private address may appear on the internet
10.0.0.0 – 10. 255.255.255 / 8
172.16.0.0 – 172. 31. 255. 255 / 12
192.168.0.0 – 192.168.255.255 / 16
Network Address Translation
Automatic configuration - DHCP
• Manual configuration is error prone (and labour
intensive – something any self-respecting admin
wishes to avoid)
IPv6
• IPv4 addresses are now long gone.
• And other problems.
• Main aims of v6
– Support billions of hosts
– Reduce the size of the routing tables
– Simplify protocol (faster processing)
– Better security
– Distinguish types of services
– Better multicasting
– Mobile devices – allow roaming
– Somewhat compatible with current solution
IPv6 in detail
• 128 bit address
– More than enough*
• Simplified headers (7 fields instead of 13 in IP)
• Better options handling - more closely described
options - easy way for routers not to look at them faster processing
• Better security - authentication and privacy features
• More QoS (Quality of Service)
*: so is 640k
IP v6 packet
IPv6 address
• More on IP v6 later
– if we have the time, that is.