Recipes » Cisco Router Interfaces - Routing and NAT

Cisco Router Interfaces - Routing and NAT

Last modified by Administrator on 2011/06/06 17:26

Cisco Router Interfaces - Routing and NAT

Networking en
Prev

Basic steps to configure two interfaces (e.g. FastEthernet0 and FastEthernet1) to their respective network addresses, add a static route between them, configure a gateway and add NAT (Network Address translation, e.g. from an LAN to external firewall).

Configure two interfaces

  1. Perform these commands to configure FastEthernet0 interface (outside):
    enable
    configure terminal
    interface FastEthernet0
    ip address 172.17.120.21 255.255.255.0
    no shutdown
    exit 
    exit
    show ip interface FastEthernet0
  2. Perform these commands to configure FastEthernet1 interface (inside):
    enable
    configure terminal
    interface FastEthernet1
    ip address 10.0.0.1 255.255.0.0
    no shutdown
    exit 
    exit
    show ip interface FastEthernet1
  3. Connect the FastEthernet1 port with a computer or similar device and check that pings work:
    On router:
    ==========
    ping 10.0.8.10
    On another device:
    ==================
    ping 10.0.0.1
  4. Set up gateway and DNS:
    config t
    ip routing
    ip route 0.0.0.0 0.0.0.0 FastEthernet0
    ip name-server 195.122.1.59
  5. Try pinging some external DNS name from router's terminal console.

Configure NAT

  1. NAT can be configured by these commands (unused):
    conf t
    interface FastEthernet0
    ip nat outside
    ^Z
    show ip interface FastEthernet0
    conf t
    interface FastEthernet1
    ip nat inside
    ^Z
  2. Some other (unused) commands:
    conf t
    ip nat pool ovrld 172.17.120.23 172.17.120.23 prefix 24
    ip nat inside source list 7 pool ovrld overload
    access-list 7 permit 10.0.0.160 0.0.0.31
    access-list 7 permit 10.0.1.100
    ^Z
    show ip nat translations
  3. Examples with static translations (unused):
    configure terminal
    ip nat inside source static 10.0.0.160 172.17.120.23
    ip nat inside source static 10.0.0.161 172.17.120.23

Prev

Links

  1. http://www.cisco.com/en/US/products/sw/iosswrel/ps5187/products_tech_note09186a00802017a1.shtml - Reset a Cisco Router to Factory Defaults.
  2. http://routersimulator.certexams.com/network-simulator-labs/configuring-ethernet-interfaces-on-a-router-network.html
  3. http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00800c525f.shtml
  4. http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080094e77.shtml
  5. http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080094e77.shtml#topic3
  6. http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080094837.shtml
  7. http://www.ietf.org/rfc/rfc1631.txt

Tags:  

Tags:
Created by Kalvis Apsītis on 2009/09/02 12:33

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 3.0.36132 - Documentation