Chapter 8: TCP/IP Internetworking I
Chapter 8: TCP/IP Internetworking I
Chapter 8: TCP/IP Internetworking I
1. Introduction
a. Ethernet and Wi-Fi is layer 1 and layer 2. They also represent a single network.
b. Internetworking involves layer 3 and layer 4 because TCP/IP dominates the
internetwork.
2. IP Routing
a. Routers make decisions about forwarding packets.
b. Router ports are called interfaces.
c. Routing is more complicated than switching and thus routers work harder and are
more expensive.
3. Hierarchical IPv4 addressing
a. IPv4: Address 32 bits long.
b. IPv4 address are hierarchical. The entire address looks like this
XXX.XXX.XXX. It goes from 0.0.0.0 to 255.255.255.255
c. Class in IP addresses
1st Octet Network/Host ID
1st Octet High Default Subnet Hosts per Network
Class Decimal (N=Network, Number of Networks
Order Bits Mask (Usable Addresses)
Range H=Host)
A 1 – 126* 0 N.H.H.H 255.0.0.0 126 (27 – 2) 16,777,214 (224 – 2)
B 128 – 191 10 N.N.H.H 255.255.0.0 16,382 (2 – 2)
14
65,534 (216 – 2)
C 192 – 223 110 N.N.N.H 255.255.255.0 2,097,150 (2 – 2)
21
254 (28 – 2)
D 224 – 239 1110 Reserved for Multicasting
E 240 – 254 1111 Experimental; used for research
Private IP Addresses
Class Private Networks Subnet Mask Address Range
A 10.0.0.0 255.0.0.0 10.0.0.0 - 10.255.255.255
B 172.16.0.0 - 172.31.0.0 255.240.0.0 172.16.0.0 - 172.31.255.255
C 192.168.0.0 255.255.0.0 192.168.0.0 - 192.168.255.255
d. An IPv4 address has three parts: The network part, The subnet part, and the host
part.
i. The network part: first 8 to 24 bits are dedicated to network part. The
network part identifies the hosts recognized network. For SJSU, it is
130.65.x.x
ii. The subnet part: the next 8 to 16 bits are dedicated to subnet part. Most
organizations further subdivide their network into smaller units called
subnets. For example 130.65 identifies SJSU, but 130.65.12.x may be
college of business, 130.65.13.x might be a certain lab, or engineering.
iii. The host part: Address of the actual individual computer. The last 8 bits
or last part of the IP address.
iv. You cannot tell by just looking at the IP address as to which part is
network, which part is subnet, and which part is host.
e. An IPv6 is also hierarchical and consist of three parts like IPv4.
4. Routers, Networks, and Subnets
a. Routers
i. Border Routers: Routers that connect one network (e.g. internal network)
to another network (e.g. outside network). For example, SJSU border
router will connect 130.65.x.x. to outside ISP’s IP address.
ii. Internal routers: Connect the different subnets within the same
organization. For SJSU, 130.65.23.x to 130.65.25.x
b. Network and Subnets
i. Routers need to be able to tell which part of the IP address is the network
part, which is the subnet part, and which is the host part.
ii. This is achieved using IPv4 mask. Mask looks like
11111111.11111111.00000000.00000000 or 255.255.0.0. The 1’s identify
the network
1. Masks can be network mask or subnet mask. A network mask
identifies network, a subnet mask identifies network and subnet.
2. A prefix notation of mask: if you see an address like
130.65.3.4/16. This means the subnet mask is 255.255.0.0 in other
words there are 16 1s followed by 16 0’s or 130.65.3.4/24 means
this lab.
c. How Routers process Packets
i. Switching vs Routing.
1. Switching: Switching table. Each frame has only one port it can
go to. In other words, ethernet address appears in one row only.
This makes switching fast and easy.
2. Routers: organized in meshes. In other words, there are multiple
ways to send the packet to the destination. Routing decision
involves identifying all paths, finding best path, sending the frame
out.
3. Routing table:
a. Each row represents a route for all IPv4 addresses within a
range. It does not need a row for each IP address but only a
group of IP addresses.
b. It does not specify the full route, just the next hop.
c. Step 1: find all row matches. Apply the row mask to the
incoming IP address. Compare the results with the
destination IP address. If the two match, then the row
matches. Find all the rows that match.
d. Step 2: Find the best match row.
i. Has the most 1’s in the row mask (e.g.
255.255.255.0)
ii. If they are same, use cost or speed metrics.
iii. Step 3: Send the packet out the interface of best
matched row.