|
Posted by derSchweiz on August 13, 2006, 2:10 am
You will need NAT configured on the router you will need rollover cable to
connect to router's console port to your PC's serial port. Then you will
need to use terminal emulation program like Hyper Terminal in Windows. Use
the settings 9600,8,N,1
Try this: (im showing the prompts just for clearity) and anything including
'//' and after are comments DO NOT type them in.
Router> enable //puts the router into privileged mode
Router# configure terminal //global configuration mode
Router(config)# interface ethernet0 //interface configuration mode
Router(config-if)# ip nat outside //outside because its the ISP
Router(config-if)# exit
Router(config)# interface fastEthernet 0
Router(config-if)# ip nat inside //this faces your LAN so it is
INSIDE
Router(config-if)# ip address 172.16.0.1 255.255.255.0
//sets the router's internal IP to 172.16.0.1, use this for your default
gateway on your clients
Router(config-if)# exit
Router(config)# access-list 1 permit 172.16.0.0 0.0.0.255
//allows your LAN clients to be translated through the NAT interface
Router(config)# ip nat inside source list 1 interface Ethernet 0 overload
//tells the router to translate LIST 1 to Ethernet 0, overload means PAT
(many-to-ne) as opposed to one to one
To make your router act as a DHCP server do this:
Router(config)# ip dhcp pool INTERNAL //enter DHCP configuration mode
Router(dhcp-config)# network 172.16.0.0 255.255.255.0 //define
the range of addresses to be distributed by DHCP
Router(dhcp-config)# default-router 172.16.0.1
//advertise THIS router 172.16.0.1 to clients to use as their default
gateway
Router(dhcp-config)# dns-server <YOUR DNS SERVER HERE> //put your dns server
there to distribute to clients, there could be more than one
Router(dhcp-config)# exit
Router(config)# ip dhcp excluded-address 172.16.0.1
//makes sure the IP address used by router does NOT get distributed to
clients
Be sure to save your configuration to NVRAM otherwise you will loose it if
you loose power!
Router(config)# exit
Router# copy running-config startup-config
The Resulting configuration should look something like this:
interface ethernet 0
ip address dhcp
ip nat outside
interface fastEthernet 0
ip address 172.16.0.1 255.255.255.0
ip nat inside
ip nat inside source list 1 interface Ethernet 0 overload
ip dhcp pool INTERNAL
network 172.16.0.0 255.255.255.0
default-router 172.16.0.1
dns-server <YOUR SERVER HERE>
ip dhcp excluded-address 172.16.0.1
You can verify the configuration by showing it using the "show run" command:
Router# show run
Router# show ip int br //this displays the IP addresses configured on the
router
Hope this Helps
Viele Grüße
> does anyone know how to setup a cisco router to cable modem and switch
> . i have 2 ports
> ethernet0 and fastethernet0 i set up the ethernet0 to dhcp , and
> fastethernet0 to lan
> i can ping google.com with my router but i cant seem to be able to get
> internet access on my client pc .
>
|