Provides services to allow end devices to exchange data
IP version 4 (IPv4) and IP version 6 (IPv6) are the principle network layer communication protocols.
The network layer performs four basic operations:
IP encapsulates the transport layer segment.
IP can use either an IPv4 or IPv6 packet and not impact the layer 4 segment.
IP packet will be examined by all layer 3 devices as it traverses the network.
The IP addressing does not change from source to destination.
IP does not establish a connection with the destination before sending the packet.
There is no control information needed (synchronizations, acknowledgments, etc.).
The destination will receive the packet when it arrives, but no pre-notifications are sent by IP.
If there is a need for connection-oriented traffic, then another protocol will handle this (typically TCP at the transport layer).
IP is Best Effort IP will not guarantee delivery of the packet.
IP has reduced overhead since there is no mechanism to resend data that is not received.
IP does not expect acknowledgments.
IP does not know if the other device is operational or if it received the packet.
IP is unreliable:
It cannot manage or fix undelivered or corrupt packets.
IP cannot retransmit after an error.
IP cannot realign out of sequence packets.
IP must rely on other protocols for these functions.
IP is media Independent:
IP does not concern itself with the type of frame required at the data link layer or the media type at the physical layer.
IP does not concern itself with the media type IP can be sent over any media type: copper, fiber, or wireless.
Packets are always created at the source.
Each host devices creates their own routing table.
A host can send packets to the following:
-Itself – 127.0.0.1 (IPv4), ::1 (IPv6)
-Local Hosts – destination is on the same LAN
-Remote Hosts – devices are not on the same LAN
The Source device determines whether the destination is local or remote
Method of determination:
IPv4 – Source uses its own IP address and Subnet mask, along with the destination IP address
IPv6 – Source uses the network address and prefix advertised by the local router
Local traffic is dumped out the host interface to be handled by an intermediary device.
Remote traffic is forwarded directly to the default gateway on the LAN
A router or layer 3 switch can be a default-gateway.
Features of a default gateway (DGW):
If a device has no default gateway or a bad default gateway, its traffic will not be able to leave the LAN.
There three types of routes in a router’s routing table:
The show ip route command shows the following route sources:
This command shows types of routes:
Static Route Characteristics:
Dynamic Routes Automatically:
Dynamic routing can also share static default routes with the other routers.
hostname R1
!
interface GigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
ip nat inside
no shutdown
!
interface GigabitEthernet0/1
ip address 172.16.1.1 255.255.255.0
ip nat inside
no shutdown
!
interface GigabitEthernet0/2
ip address 172.16.2.1 255.255.255.0
ip nat inside
no shutdown
!
interface Serial0/0/0
ip address 209.165.200.1 255.255.255.0
ip nat outside
no shutdown
!
ip nat inside source list 1 interface Serial0/0/0 overload
!
access-list 1 permit 192.168.10.0 0.0.0.255
access-list 1 permit 192.168.20.0 0.0.0.255
access-list 1 permit 192.168.30.0 0.0.0.255
!
ip route 192.168.20.0 255.255.255.0 172.16.1.2
ip route 192.168.30.0 255.255.255.0 172.16.2.3
ip route 0.0.0.0 0.0.0.0 s0/0/0
hostname R2
!
interface GigabitEthernet0/0
ip address 192.168.20.1 255.255.255.0
no shutdown
!
interface GigabitEthernet0/1
ip address 172.16.1.2 255.255.255.0
no shutdown
!
ip route 192.168.10.0 255.255.255.0 172.16.1.1
ip route 192.168.30.0 255.255.255.0 172.16.1.1
ip route 172.16.2.0 255.255.255.0 172.16.1.1
ip route 0.0.0.0 0.0.0.0 172.16.1.1
hostname R3
!
interface GigabitEthernet0/0
ip address 192.168.30.1 255.255.255.0
no shutdown
!
interface GigabitEthernet0/2
ip address 172.16.2.3 255.255.255.0
no shutdown
!
ip route 192.168.10.0 255.255.255.0 172.16.2.1
ip route 192.168.20.0 255.255.255.0 172.16.2.1
ip route 172.16.1.0 255.255.255.0 172.16.2.1
ip route 0.0.0.0 0.0.0.0 172.16.2.1