07-20-2022 06:59 AM - edited 07-21-2022 01:29 AM
Good Afternoon All,
First off, my apologies if this subject has been touched on before, but I'm relatively new to Cisco and the OS, and just finding my feet - I'd appreciate some help with the below.
I've recently had a leased line installed from BT, and opted for the "wires only" option - which basically means I have to provide my own router and connect into their NTE. I have a C1111-8P, and have connected via SFP and an OM3 multimode cable into the BT unit. I have successfully configured the WAN connection GigabitEthernet0/0/0 with the BT provided IP and Subnet mask, and have configured GigabitEthernet0/0/1 with a single (internal) static IP 192.168.1.1/255.255.255.0. A test from the router's WAN diagnostics page shows the WAN connected and can ping the test address of 8.8.8.8
My query is, please, can someone provide the OS commands I need to run in order to route LAN traffic to the WAN. As things currently stand, I cannot access the internet - I assume because I am missing some routing. If anyone could provide an example step-by-step using some example WAN/LAN IP's, it would be very much appreciated!
I have the following configuration as it stands presently (usernames and crypto related content removed), and I can now ping by IP from the LAN, but unable to resolve names:
!
no aaa new-model
!
ip name-server 194.72.9.34 194.73.82.242
ip dhcp excluded-address 192.168.1.0
ip dhcp excluded-address 192.168.1.255 255.255.255.255
!
ip dhcp pool WEBUIPool
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
!
!
subscriber templating
multilink bundle-name authenticated
!
!
!
!
spanning-tree extend system-id
!
!
redundancy
mode none
!
!
vlan internal allocation policy ascending
!
!
!
!
!
!
interface GigabitEthernet0/0/0
ip address 62.6.143.37 255.255.255.254
no ip unreachables
ip nat outside
media-type sfp
negotiation auto
no cdp enable
!
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
no ip unreachables
ip nat inside
negotiation auto
no cdp enable
!
interface GigabitEthernet0/1/0
!
interface GigabitEthernet0/1/1
!
interface GigabitEthernet0/1/2
!
interface GigabitEthernet0/1/3
!
interface GigabitEthernet0/1/4
!
interface GigabitEthernet0/1/5
!
interface GigabitEthernet0/1/6
!
interface GigabitEthernet0/1/7
!
interface Vlan1
no ip address
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
ip nat inside source list 1 interface GigabitEthernet0/0/0 overload
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
!
!
!
control-plane
!
!
line con 0
transport input none
stopbits 1
line vty 0 4
login
!
07-21-2022 01:45 AM
Hello,
the config looks good actually. I think you need to add a DNS server to your DHCP pool:
ip dhcp pool WEBUIPool
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
--> dns-server 8.8.8.8
07-21-2022 02:19 AM
Hi Georg,
Thank you for the comment - i've added in the two external BT name servers to the DHCP configuration, and I now have a connection.
However, is it normal to specify external name servers within what is the internal DHCP range? Usually I'd expect to see the DNS server as the same IP address of the router itself (in this case 192.168.1.1). I have configured the name-servers entry to also have the two external IPs for the BT servers, so would have expected it to have known about these - unless of course something else is amiss in my config...?
07-21-2022 02:41 AM
Hello,
basically, the 'ip name-server' is used for the router to resolve DNS names. For the clients (in the DHCP pool), the 'dns-server' is being used. Hope that makes sense, it is (very) common practice to define the DNS servers in the DHCP pool)...
07-21-2022 03:36 AM - edited 07-21-2022 03:51 AM
Hello
I would suggest using your own rtr
ip dhcp pool WEBUIPool
dns server 192.168.1.1
ip dns-server 192.168.1.1
EDITED- use a definative nexthop if possible
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/ 62.6.143.3x
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide