cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
18662
Views
0
Helpful
6
Replies

add a static route through the another host within the same vlan as the router

david.wang
Level 1
Level 1

this is router 887, its vlan is 192.168.3.1/24. If I'd like to add a static route via different host within same vlan, rather than the router, like:

          ip route 192.168.100.0/24 192.168.3.6

how can we achieve it?

i tried adding it directly and failed:

          (config)#ip route 192.168.100.0 255.255.255.0 192.168.3.6

          %Invalid next hop address (it's this router)

any idea is much appreciated!!!

6 Replies 6

nkarpysh
Cisco Employee
Cisco Employee

Hello,

Try replacing 192.168.3.6 with ip of remote host or use interface VLAN X as a next hop e.g.

ip route 192.168.100.0/24 vlan X

Nik

HTH,
Niko

thanks for your info.

but 192.168.3.6 is the ip of remote host, which is within the same vlan as the router: vlan1, i can't add it without the remote ip, it gets the same error if config is:

ip route 192.168.100.0 255.255.255.0 vlan 1 192.168.3.6

hi,

can you post a show run here?

Hope it Helps!

Soroush.

it's here:

version 15.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
!
boot-start-marker
boot-end-marker
!
!
logging buffered 52000
no logging console

ip dhcp pool internal
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
!
!
interface BRI0
no ip address
encapsulation hdlc
shutdown
isdn termination multidrop
!
interface ATM0
no ip address
no atm ilmi-keepalive
!
interface ATM0.1 point-to-point
pvc 8/35
  pppoe-client dial-pool-number 1
!
!
interface FastEthernet0
no ip address
!
interface FastEthernet1
no ip address
!
interface FastEthernet2
no ip address
!
interface FastEthernet3
no ip address
!
interface Vlan1
ip address 192.168.3.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
ip tcp adjust-mss 1412
!
interface Dialer0
ip address negotiated
ip mtu 1452
ip nat outside
ip virtual-reassembly in
encapsulation ppp
dialer pool 1
dialer-group 1
ppp authentication chap callin
ppp chap hostname *********
ppp chap password 0 ******
no cdp enable
!
ip route 0.0.0.0 0.0.0.0 Dialer0

does the next hop you r setting receives its ip address from your dhcp pool? try to make an exclusion (ip dhcp exclude-address) for your intended next hop and try again, see if it works this time.

all other configs look ok to me!

plz Rate if it helped.

Soroush.

Hope it Helps!

Soroush.

actually it does contain already:

ip dhcp excluded-address 192.168.3.1 192.168.3.9

i think the problem is the router seems not supporting the static route next hop to another host within the same vlan. but don't know what the better solution is to sort it out.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card