next up previous contents
Next: The Routing Table Up: IP Routing Previous: Subnetworks

Gateways

Subnetting is not only an organizational benefit, it is frequently a natural consequence of hardware boundaries. The viewpoint of a host on a given physical network, such as an Ethernet, is a very limited one: the only hosts it is able to talk to directly are those of the network it is on. All other hosts can be accessed only through so-called gateways. A gateway is a host that is connected to two or more physical networks simultaneously and is configured to switch packets between them.

For IP to be able to easily recognize if a host is on a local physical network, different physical networks have to belong to different IP networks. For example the network number 149.76.4.0 is reserved for hosts on the mathematics LAN. When sending a datagram to quark, the network software on erdos immediately sees from the IP address, 149.76.12.4, that the destination host is on a different physical network, and therefore can be reached only through a gateway (sophus by default).

sophus itself is connected to two distinct subnets: the Mathematics Department, and the campus backbone. It accesses each through a different interface, eth0 and fddi0, respectively. Now, what IP address do we assign it? Should we give it one on subnet 149.76.1.0, or on 149.76.4.0?

The answer is: both. When talking to a host on the Maths LAN, sophus should use an IP address of 149.76.4.1, and when talking to a host on the backbone, it should use 149.76.1.4.

Thus, a gateway is assigned one IP address per network it is on. These addresses --- along with the corresponding netmask --- are tied to the interface the subnet is accessed through. Thus, the mapping of interfaces and addresses for sophus would look like this:

The last entry describes the loopback interface lo, which was introduced above.

Figure #introfigip#93> shows a part of the network topology at Groucho Marx University (GMU). Hosts that are on two subnets at the same time are shown with both addresses.

[htbp]

figures/groucho.epsf

(350,357)(0,-10) (21,246)(21,256)(8,256) (8,246)(21,246) (19,248)(19,254)(10,254) (10,248)(19,248) (8,244)(21,244)(25,241) (25,240)(5,240)(5,241)(8,244) (91,311)(91,321)(78,321) (78,311)(91,311) (89,313)(89,319)(80,319) (80,313)(89,313) (78,309)(91,309)(95,306) (95,305)(75,305)(75,306)(78,309) (166,246)(166,256)(153,256) (153,246)(166,246) (164,248)(164,254)(155,254) (155,248)(164,248) (153,244)(166,244)(170,241) (170,240)(150,240)(150,241)(153,244) (201,246)(201,256)(188,256) (188,246)(201,246) (199,248)(199,254)(190,254) (190,248)(199,248) (188,244)(201,244)(205,241) (205,240)(185,240)(185,241)(188,244) (271,311)(271,321)(258,321) (258,311)(271,311) (269,313)(269,319)(260,319) (260,313)(269,313) (258,309)(271,309)(275,306) (275,305)(255,305)(255,306)(258,309) (346,246)(346,256)(333,256) (333,246)(346,246) (344,248)(344,254)(335,254) (335,248)(344,248) (333,244)(346,244)(350,241) (350,240)(330,240)(330,241)(333,244) (91,176)(91,186)(78,186) (78,176)(91,176) (89,178)(89,184)(80,184) (80,178)(89,178) (78,174)(91,174)(95,171) (95,170)(75,170)(75,171)(78,174) (271,176)(271,186)(258,186) (258,176)(271,176) (269,178)(269,184)(260,184) (260,178)(269,178) (258,174)(271,174)(275,171) (275,170)(255,170)(255,171)(258,174) (221,141)(221,151)(208,151) (208,141)(221,141) (219,143)(219,149)(210,149) (210,143)(219,143) (208,139)(221,139)(225,136) (225,135)(205,135)(205,136)(208,139) (151,76)(151,86)(138,86) (138,76)(151,76) (149,78)(149,84)(140,84) (140,78)(149,78) (138,74)(151,74)(155,71) (155,70)(135,70)(135,71)(138,74) (296,76)(296,86)(283,86) (283,76)(296,76) (294,78)(294,84)(285,84) (285,78)(294,78) (283,74)(296,74)(300,71) (300,70)(280,70)(280,71)(283,74) (221,6)(221,16)(208,16) (208,6)(221,6) (219,8)(219,14)(210,14) (210,8)(219,8) (208,4)(221,4)(225,1) (225,0)(205,0)(205,1)(208,4) (85,245)110110 (265,245)110110 (215,75)110110 (30,245)(20,245) (140,245)(155,245) (85,305)(85,300) (210,245)(200,245) (320,245)(335,245) (265,305)(265,300) (85,190)(85,185) (265,190)(265,185) (85,170)(85,160) (265,170)(265,160) (55,160)(290,160) 4.000(55,160)(25,160) 4.000(290,160)(320,160) (215,160)(215,150) (215,135)(215,130) (160,75)(150,75) (270,75)(285,75) (215,15)(215,20) (100,175)(0,0)[lb]910.8rmsophus (280,175)(0,0)[lb]910.8rmniels (330,230)(0,0)[lb]910.8rmquark (150,230)(0,0)[lb]910.8rmerdos (340,260)(0,0)[b]910.8rm12.4 (160,260)(0,0)[b]910.8rm4.17 (0,230)(0,0)[lb]910.8rmgauss (80,195)(0,0)[lb]910.8rm4.1 (260,195)(0,0)[lb]910.8rm12.1 (60,165)(0,0)[lb]910.8rm1.4 (235,165)(0,0)[lb]910.8rm1.12 (75,240)(0,0)[lb]1214.4tt4.0 (250,240)(0,0)[lb]1214.4tt12.0 (5,260)(0,0)[lb]910.8rm4.23 (55,145)(0,0)[lb]1113.2itCampus Backbone (230,140)(0,0)[lb]910.8rm

gcc1 (190,145)(0,0)[lb]910.8rm1.1 (210,115)(0,0)[lb]910.8rm2.1 (205,75)(0,0)[lb]1214.4tt1.0 (50,5)(0,0)[lb]1113.2itGroucho Computing Centre (185,330)(0,0)[lb]1113.2itTheoretical Physics Department (25,330)(0,0)[lb]1113.2itMathematics Department

nclude{flow.asci}


  A part of the net topology at Groucho Marx Univ.

Generally, you can ignore the subtle difference between attaching an address to a host or its interface. For hosts that are on one network only, like erdos, you would generally refer of the host as having this-and-that IP address although strictly speaking, it's the Ethernet interface that has this IP address. However, this distinction is only really important when you refer to a gateway.

 



next up previous contents
Next: The Routing Table Up: IP Routing Previous: Subnetworks



Ross Biro
Fri May 19 10:18:11 PDT 1995