What we will cover… Home Networking: Network Address Translation (NAT) Mobile Routing.
Published byModified over 4 years ago
Presentation on theme: "What we will cover… Home Networking: Network Address Translation (NAT) Mobile Routing."— Presentation transcript:
What we will cover… Home Networking: Network Address Translation (NAT) Mobile Routing
Home network local network (e.g., home network) rest of Internet
NAT: Network Address Translation 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 184.108.40.206 local network (e.g., home network) 10.0.0/24 rest of Internet Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) All datagrams leaving local network have same single source NAT IP address: 220.127.116.11, different source port numbers
NAT: Network Address Translation r Advantages: m local network uses just one IP address as far as outside world is concerned: min. IP address wastage m can change addresses of devices in local network without notifying outside world: flexibility m devices inside local net not explicitly addressable, visible by outside world (a security plus).
NAT: Network Address Translation Implementation: NAT router must: m outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr. m remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair m incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table
NAT: Network Address Translation 10.0.0.1 10.0.0.2 10.0.0.3 S: 10.0.0.1, 3345 D: 18.104.22.168, 80 1 10.0.0.4 22.214.171.124 1: host 10.0.0.1 sends datagram to 126.96.36.199, 80 NAT translation table WAN side addr LAN side addr 188.8.131.52, 5001 10.0.0.1, 3345 …… S: 184.108.40.206, 80 D: 10.0.0.1, 3345 4 S: 220.127.116.11, 5001 D: 18.104.22.168, 80 2 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 22.214.171.124, 5001, updates table S: 126.96.36.199, 80 D: 188.8.131.52, 5001 3 3: Reply arrives dest. address: 184.108.40.206, 5001 4: NAT router changes datagram dest addr from 220.127.116.11, 5001 to 10.0.0.1, 3345
NAT: Network Address Translation r 16-bit port-number field: m 60,000 simultaneous connections with a single LAN-side address!
NAT traversal problem r client wants to connect to server with address 10.0.0.1 m server address 10.0.0.1 local to LAN (client can’t use it as destination addr) m only one externally visible NATted address: 18.104.22.168 r solution 1: statically configure NAT to forward incoming connection requests at given port to server m e.g., (22.214.171.124, port 2500) always forwarded to 10.0.0.1 10.0.0.1 10.0.0.4 NAT router 126.96.36.199 Client ?
NAT traversal problem r solution 2: relaying (used in Skype) m NATed client establishes connection to relay m External client connects to relay m relay bridges packets between connections 188.8.131.52 Client 10.0.0.1 NAT router 1. connection to relay initiated by NATted host 2. connection to relay initiated by client 3. relaying established
NAT: Network Address Translation r NAT is controversial: m routers should only process up to layer 3 m NAT breaks that protocol!!!
What is mobility? r spectrum of mobility, from the network perspective: no mobility high mobility mobile user, using same access point mobile user, passing through multiple access point while maintaining ongoing connections ( like cell phone) mobile user, connecting/ disconnecting from network using DHCP.
Mobility: Vocabulary home network: permanent “home” of mobile (e.g., 128.119.40/24) Permanent address: address in home network, can always be used to reach mobile e.g., 184.108.40.206 home agent: entity that will perform mobility functions on behalf of mobile, when mobile is remote wide area network correspondent
Mobility: more vocabulary Care-of-address: address in visited network. (e.g., 79,129.13.2) wide area network visited network: network in which mobile currently resides (e.g., 79.129.13/24) Permanent address: remains constant ( e.g., 220.127.116.11) home agent: entity in visited network that performs mobility functions on behalf of mobile. correspondent: wants to communicate with mobile
Mobility: approaches r Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange. m routing tables indicate where each mobile located m no changes to end-systems r Let end-systems handle it: m indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote m direct routing: correspondent gets foreign address of mobile, sends directly to mobile
Mobility: approaches r Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange. m routing tables indicate where each mobile located m no changes to end-systems r let end-systems handle it: m indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote m direct routing: correspondent gets foreign address of mobile, sends directly to mobile not scalable to millions of mobiles
Mobility: registration End result: r Foreign agent knows about mobile r Home agent knows location of mobile wide area network home network visited network 1 mobile contacts foreign agent on entering visited network 2 foreign agent contacts home agent home: “this mobile is resident in my network”
Mobility via Indirect Routing wide area network home network visited network 3 2 4 1 correspondent addresses packets using home address of mobile home agent intercepts packets, forwards to foreign agent foreign agent receives packets, forwards to mobile mobile replies directly to correspondent
Forwarding datagrams to remote mobile Permanent address: 18.104.22.168 Care-of address: 22.214.171.124 dest: 126.96.36.199 packet sent by correspondent dest: 188.8.131.52 dest: 184.108.40.206 packet sent by home agent to foreign agent: a packet within a packet dest: 220.127.116.11 foreign-agent-to-mobile packet
Indirect Routing: comments r Mobile uses two addresses: m permanent address: used by correspondent (hence mobile location is transparent to correspondent) m care-of-address: used by home agent to forward datagrams to mobile r foreign agent functions may be done by mobile itself r triangle routing: correspondent-home-network- mobile m inefficient when correspondent, mobile are in same network
Mobility via Direct Routing wide area network home network visited network 4 2 4 1 correspondent requests, receives foreign address of mobile correspondent forwards to foreign agent foreign agent receives packets, forwards to mobile mobile replies directly to correspondent 3
Mobility via Direct Routing: comments r overcome triangle routing problem r non-transparent to correspondent: correspondent must get care-of-address from home agent m What happens if mobile changes networks?