ITET1 Routing Network layer.odp

Embed Size (px)

Citation preview

  • 1. Network layerBasic routing

2. OSI model

  • Network layer

3. How to connect different subnets 4. Logical addressing 5. Routers and subnets

  • What is
  • A router?

6. A subnet? 7. Logical addresses Switches are for later 8. Connection through routers 9. Routers and subnets How does packet go from PC A to B? 10. Inside a router 11. Routing tables

  • Routing table on windows
  • route print

Routing table on my linux box (Using route -n instead of ip route show table all for readability) 12. SOHO network example

  • What is needed for this network?
  • DHCP, NAT, IP, netmask addresses, gateway.

13. Exercise

  • What is DHCP?
  • Look it up.

Use Wireshark to find DHCP packets.

  • What do they contain?

14. Does it correspond to your network settings? 15. Internet protocol

  • Old protocol
  • Like UDP and TCP

Make sure you know how TCP/IP works. 16. IP addresses The IP address for the eth0 interface Broadcast is a reserved address. Used to send to all hosts on subnet Subnet mask is used with IP address to determine the subnet IP range Default route is another word for default gateway. Used when sending to hosts outside the local subnet Primary DNS is the server to ask when translating from exmaple.com to an IP address OSI layers 1 and 2 17. Exercise

  • Find the IP information for your PC
  • Which interface is active?

18. Find the subnet IP range 19. How many IP addresses does it cover 20. DNS server? Default gateway 21. Network configuration

  • Always use DHCP
  • Except (maybe) for servers

DHCP allows centralized administration. 22. DHCP in action Note the difference between first request and subsequent requests 23. Internet control message protocol

  • Examples
  • Echo request

24. Echo reply 25. Destination host unreachable 26. TTL expired 27. ICMP exercise

  • Ping
  • Do a ping request to a local existing IP

28. Do a ping request to a local non-existing IP Traceroute

  • What is traceroute?

29. Traceroute google.com 30. Traceroute sde.dk Use wireshark to check requests and responses 31. Multiple routers

  • What is required for PC A to talk to PC B?

32. Hint:

  • It is all about routing tables.

33. Manual configuration

  • ip route add 192.168.55.0/24 via 192.168.1.254 dev eth1

34. Simple. 35. Why not do it manually:

  • New subnet address

36. Subnet on different device 37. Many subnets makes this important issues 38. Router autoconfiguration

  • Two options
  • Link-state
  • Each router has a complete routing table, i.e. a complete image of the network

Distance vector

  • Router only retains keep a distance table with dst network, next router and distance (e.g. hop count)

Implementations

  • OSPF (link-state)

39. RIP (Distance vector) 40. IGP and EGP IGP (using RIP or OSPF) EGP (using BGP) 41. Border gateway protocol

  • Live demo!
  • Starthere

42. Choose a server an telnet to it 43. sho ip bgp summary 44. sho ip ngp