Router - (2) - Basic Configuration

A router is a layer-3 device, and the most important thing at layer-3 isip

So ipyou need to know the basics

  1. IPaddress classification
  2. Variable-length subnet mask
    By using a variable-length subnet mask, networks with the same network number (adjacent ip, different blocks) can use different masks,
    which can save IPaddresses and make full use of the effective IPaddress space.
  3. Use network address translation NAT
    NAT( Network Address Translation) to translate internal private addresses into external legal global addresses ,
    so that users who do not have legal IPaddresses can access the external Internet through NAT .
  4. Static route
    By configuring static route, users can manually specify the path to be passed when accessing a certain network . Static route is adopted when the network structure is relatively simple and the path to a certain network is generally unique .

Basic Configuration - Common Commands

effect Order
Physical Line Setup line type number
Set up static routes ip route destination subnet-mask next-hop
start IProuting ip routing

NAT configuration

effect Order
Define a global address pool ip nat pool name start-ip end-ip {netmask netmask or prefix-length prefix-length} [type rotary]
define a standard access list access-list access-list-number permit source [source-wildcard]
Build dynamic address translation (internal ipaccess table mapping external ippool) ip nat inside source {list {access-list-number or name} pool name [overload] or static local-ip global-ip}
Specify internal and external ports ip nat {inside or outside}

Static routing configuration

effect Order
Create a static route ` ip route prefix mask {address

annotation

logo Express
Prefix The part of the destination network to be reached
mask subnet mask
address The address of the next hop IP, that is, the port address of the adjacent router (equivalent to the interface number of the router itself).
interface local network interface
distance Administrative distance (optional)
tag tag tagweight (optional)
permanent Specifies that this route will not be removed even if the port is down.

ah real
The configuration result is the same, next hop ipa physical interface connected to the destination network with itself

If the router is not connected to other routers, it can also be assigned a default route to replace the static route to all network parts, that is, as long as no path to a specific destination address is
Assad
found in the routing table , the data will be routed to the address on the adjacent router.192.168.2.1

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325762433&siteId=291194637