Routing Flashcards
router
any hardware or software that forwards packets based on their destination IP address
layers in each model where routers belong
OSI - network layer
TCP/IP - Internet layer
interfaces
at least 2 - 1 internal, 1 external
can have more
2 criteria in each column of the routing table
which packets are for the route
which port to send them out
destination LAN IP
defined network ID
every network ID directly connected to one of the router’s ports is always listed here
subnet mask is needed to define the network
gateway
IP address for next hop router
where the packet should go
gateway when directly connected to network
gateway not needed
value set to 0.0.0.0 or IP address or directly connected port
gateway when not directly connected to network
gateway column of the routing table tells the router the IP address of a router to send packet to
interface
tells router which of its ports to use
LAN / WAN
Port IP
fa0/0 & fa0/0 - Cisco
0 in routing table
means “anything”
default route (example)
[0.0.0.0] [0.0.0.0] [70.30.4.1] [WAN]
any destination address
with any subnet mask
forward to 70.30.4.1
using WAN port
default route (importance)
tells router what to do with every incoming packet unless another line in the routing table gives another route
2 places where routers do not have default routes
private internetworks - every router knows every network
tier 1 Internet backbone
other devices with routing tables
all TCP/IP capable devices
command to display routing table
netstat -r (OS X & Windows)
route print (Windows)
metric
relative value that defines the cost of using a particular route
adding interfaces to a router
removable modules are available for more powerful routers
NAT
network address translation
enables routers to hide internal IP addresses while still allowing communication with the broader Internet
how NAT functions
router replaces the source IP address of a computer is its outside interface address on outgoing packets
basic NAT
translates the private / internal IP address to the global IP address on 1-1 basis
primary reason NAT was created & conception of what it does
address the problem of limited IPv4 addresses
security / anonymity
PAT
port address translation
uses port numbers to route traffic from specific machine in the network
most common form of NAT that handles 1-to-many connections
how PAT functions
internal machine initiates a session with an external machine
source & destination IP addresses & port numbers for TCP segment / UDP datagram are recorded in PAT’s translation table
private IP address is swapped for public IP address on each packet
port number used by the internal computer for the session is also translated into a unique port number that is also recorded by router
receiving system returns packet - reverses IP addresses & ports
router compares incoming destination IP address & port number and compares to translation table - puts correct IP back on packet
sends to correct computer
PAT limitation
only works for outgoing communication, not incoming communication
SNAT
static NAT
maps a single routable (not private) IP address to a single machine
enables access to that machine from outside the network
port forwarding
designate a specific local address for various network services
request a service using the public IP address of the router & the port number of the desired service
how port-forwarding routers work
examines the packet & compares to list of services mapped to local addresses
sends packet to appropriate computer
hiding hosted services inside network
change default port number for that service
DNAT
many computers can share a pool of routable IP addresses that number fewer than the number of computers
LAN traffic uses internal IP
NAT distributes routable IP from the pool for external requests
metrics only work when
there are direct connections between network IDs
hop
each time a packet goes through a router
metric
relative value that routers use when they have more than one route to get to another network
router always chooses route with lowest metric
most common criteria for determining a metric
hop count
bandwidth
latency
cost
MTU
how many hops with 3 intermediate routers
4
latency
collective term that describes the large number of issues that may occur between routers that slow down network connections