09-19-2017 04:47 AM - edited 03-08-2019 12:05 PM
Unable to ping 8.8.8.8 throught console and ssh after assigning VLAN 1 IP . when vlan 1 is dynamic tis able to ping ?
After assigned Static IP
switch20863b#sh ip int
IP Address I/F I/F Status Type Directed Prec Redirect Status
admin/oper Broadcast
------------------ --------- ---------- ------- --------- ---- -------- ------
10.0.1.172/23 vlan 1 UP/UP Static disable No enable Valid
switch20863b#sh ip route
Maximum Parallel Paths: 1 (1 after reset)
IP Forwarding: enabled
Codes: > - best, C - connected, S - static
C 10.0.0.0/23 is directly connected, vlan 1
switch20863b#sh ip route static
Maximum Parallel Paths: 1 (1 after reset)
IP Forwarding: enabled
Codes: A - active, I - inactive
I 10.0.0.0/23 [1/6] via 10.0.0.5
output
switch20863b#ping 8.8.8.8
Pinging 8.8.8.8 with 18 bytes of data:
PING: net-unreachable
PING: net-unreachable
PING: net-unreachable
PING: net-unreachable
----8.8.8.8 PING Statistics----
4 packets transmitted, 0 packets received, 100% packet loss
Before assign ip static IP
switch20863b#sh ip int
IP Address I/F I/F Status Type Directed Prec Redirect Status
admin/oper Broadcast
------------------ --------- ---------- ------- --------- ---- -------- ------
10.0.0.231/23 vlan 1 UP/UP DHCP disable No enable Valid
switch20863b#sh ip route static
Maximum Parallel Paths: 1 (1 after reset)
IP Forwarding: enabled
Codes: A - active, I - inactive
switch20863b#sh ip route
Maximum Parallel Paths: 1 (1 after reset)
IP Forwarding: enabled
Codes: > - best, C - connected, S - static
D 0.0.0.0/0 [1/8] via 10.0.0.5, 00:01:12, vlan 1
C 10.0.0.0/23 is directly connected, vlan 1
switch20863b#ping 8.8.8.8
Pinging 8.8.8.8 with 18 bytes of data:
18 bytes from 8.8.8.8: icmp_seq=1. time=10 ms
18 bytes from 8.8.8.8: icmp_seq=2. time=10 ms
18 bytes from 8.8.8.8: icmp_seq=3. time=10 ms
18 bytes from 8.8.8.8: icmp_seq=4. time=10 ms
----8.8.8.8 PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip (ms) min/avg/max = 10/10/10
Solved! Go to Solution.
09-19-2017 05:17 AM
Hi there,
When you switch configures its VLAN1 SVI via DHCP it picks up a default gateway of 10.0.0.5 .
When you manually configre the SVI you need to configre the default route:
! ip route 0.0.0.0 0.0.0.0 10.0.0.5 !
cheers,
Seb.
09-20-2017 03:15 AM
09-19-2017 05:17 AM
Hi there,
When you switch configures its VLAN1 SVI via DHCP it picks up a default gateway of 10.0.0.5 .
When you manually configre the SVI you need to configre the default route:
! ip route 0.0.0.0 0.0.0.0 10.0.0.5 !
cheers,
Seb.
09-19-2017 06:00 AM
Thank you for support , as you said it could not work command is bad parameter value .
switch20863b(config)#ip route 0 0 10.0.0.5
switch20863b(config)#ip route 0 0 10.0.0.5
% bad parameter value
switch20863b#sh run
config-file-header
switch20863b
v2.1.0.60 / RTESLA2.1_810_055_058
CLI v1.0
set system
file SSD indicator encrypted
@
ssd-control-start
ssd config
ssd file passphrase control unrestricted
no ssd file integrity control
ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0
!
voice vlan oui-table add 0001e3 Siemens_AG_phone________
voice vlan oui-table add 00036b Cisco_phone_____________
voice vlan oui-table add 00096e Avaya___________________
voice vlan oui-table add 000fe2 H3C_Aolynk______________
voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
voice vlan oui-table add 00d01e Pingtel_phone___________
voice vlan oui-table add 00e075 Polycom/Veritel_phone___
voice vlan oui-table add 00e0bb 3Com_phone______________
bonjour interface range vlan 1
hostname switch20863b
username cisco password encrypted b53d9d935bc892d64bc7967d8120e46e990b8381 privilege 15
ip ssh server
!
interface vlan 1
ip address 10.0.1.172 255.255.254.0
no ip address dhcp
!
interface gigabitethernet1
spanning-tree link-type point-to-point
switchport mode trunk
macro description switch
!next command is internal.
macro auto smartport dynamic_type switch
!
interface gigabitethernet24
spanning-tree link-type point-to-point
switchport mode trunk
macro description switch
!next command is internal.
macro auto smartport dynamic_type switch
!
interface gigabitethernet26
spanning-tree link-type point-to-point
switchport mode trunk
macro description switch
!next command is internal.
macro auto smartport dynamic_type switch
!
exit
ip route 10.0.0.0 /23 10.0.0.5 metric 6
switch20863b#
switch20863b#sh vl
Created by: D-Default, S-Static, G-GVRP, R-Radius Assigned VLAN, V-Voice VLAN
Vlan Name Tagged Ports UnTagged Ports Created by
---- ----------------- ------------------ ------------------ ----------------
1 1 gi1-28,Po1-8 DV
09-20-2017 03:15 AM
Try:
! ip default-gateway 10.0.0.5 !
cheers,
Seb.
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