PBR - associate default gateway to VLAN

Hi

I need to associate a VLAN with a certain gateway. I am using PBR on my Cisco 3750 switch.

I have associated a port on my switch to VLAN51 which has a route map associated to it.

To sum it up, all traffic on VLAN51, which is in the 10.255.0.0 range needs to go out a default gate way of 10.255.251.218.

At the moment when I plug my laptop into the port I have associated with VLAN51 and this policy route map I am not getting an IP Address, I am getting a 169.254.25.167 address.

I have gone wrong somewhere in mycode.

Can any one shed any light?



User Access Verification

Password:
Server_1>en
Password:
Server_1#sh run
Building configuration...

Current configuration : 4586 bytes
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname Server_1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$Ih7N$/F5ofwungG22PnTkbJVoF1
!
no aaa new-model
clock summer-time UTC recurring last Sun Mar 1:00 last Sun Oct 2:00
switch 1 provision ws-c3750g-48ps
system mtu routing 1500
udld aggressive

ip subnet-zero
!
!
!
mls qos map cos-dscp 0 8 16 26 32 46 46 56
!
!
!
errdisable recovery cause link-flap
errdisable recovery interval 60
!
!
macro global description cisco-global
!
spanning-tree mode rapid-pvst
spanning-tree loopguard default
spanning-tree etherchannel guard misconfig
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
interface Port-channel1
!
interface GigabitEthernet1/0/1
!
interface GigabitEthernet1/0/2
!
interface GigabitEthernet1/0/3
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
!
interface GigabitEthernet1/0/13
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
!
interface GigabitEthernet1/0/21
!
interface GigabitEthernet1/0/22
!
interface GigabitEthernet1/0/23
!
interface GigabitEthernet1/0/24
!
interface GigabitEthernet1/0/25
!
interface GigabitEthernet1/0/26
!
interface GigabitEthernet1/0/27
!
interface GigabitEthernet1/0/28
!
interface GigabitEthernet1/0/29
!
interface GigabitEthernet1/0/30
!
interface GigabitEthernet1/0/31
!
interface GigabitEthernet1/0/32
!
interface GigabitEthernet1/0/33
!
interface GigabitEthernet1/0/34
 !
interface GigabitEthernet1/0/35
 !
interface GigabitEthernet1/0/36
!
interface GigabitEthernet1/0/37
 switchport access vlan 51
 switchport mode access
!
interface GigabitEthernet1/0/38
!
interface GigabitEthernet1/0/39
!
interface GigabitEthernet1/0/40
!
interface GigabitEthernet1/0/41
!
interface GigabitEthernet1/0/42
!
interface GigabitEthernet1/0/43
!
interface GigabitEthernet1/0/44
!
interface GigabitEthernet1/0/45
!
interface GigabitEthernet1/0/46
!
interface GigabitEthernet1/0/47
 description Uplink
 switchport trunk encapsulation dot1q
 switchport mode trunk
 auto qos voip trust
 macro description cisco-switch
 spanning-tree link-type point-to-point
!
interface GigabitEthernet1/0/48
 description Uplink
 switchport trunk encapsulation dot1q
 switchport mode trunk
 auto qos voip trust
 macro description cisco-switch
 spanning-tree link-type point-to-point
!
interface GigabitEthernet1/0/49
 switchport trunk encapsulation dot1q
 switchport mode trunk
 auto qos voip trust
 macro description cisco-switch | cisco-switch
 channel-group 1 mode auto
 spanning-tree link-type point-to-point
!
interface GigabitEthernet1/0/50
 switchport trunk encapsulation dot1q
 switchport mode trunk
 auto qos voip trust
 macro description cisco-switch | cisco-switch
 channel-group 1 mode auto
 spanning-tree link-type point-to-point
!
interface GigabitEthernet1/0/51
 switchport trunk encapsulation dot1q
 switchport mode trunk
 macro description cisco-switch
 spanning-tree link-type point-to-point
!
interface GigabitEthernet1/0/52
 switchport trunk encapsulation dot1q
 switchport mode trunk
 macro description cisco-switch
 spanning-tree link-type point-to-point
!
interface Vlan1
 ip address 10.255.250.31 255.255.0.0
!
interface Vlan50
 no ip address
!
interface Vlan51
 description Baracuda Internet
 no ip address
 ip policy route-map VLAN51INTERNET
!
ip default-gateway 10.255.251.36
ip classless
ip http server
!
!
access-list 101 permit ip any any
route-map VLAN51INTERNET permit 10
 match ip address 101
 set ip next-hop 10.255.251.218
!
!
!
control-plane
!
banner login ^C
###########################################
###########################################^C
!
line con 0
line vty 0 4
 password 7 030A081F115F33470F
 login
 length 0
line vty 5 15
 password 7 1419411F1B54382065
 login
 length 0
!
end

Server_1#

Thanks!
kilbride98Asked:
Who is Participating?
 
Rick_O_ShayCommented:
From the 169.254.25.167 indication it looks like you are not getting a DHCP address to your PC on this VLAN. You will need an IP helper pointing to the DHCP server or configure the PC manually for an address in that VLAN.
0
 
kilbride98Author Commented:
I added an ip helper address under vlan 51 back to my dhcp server but I am still getting the 169.254.25.167 address. Do I need to input the command somewhere else rather than on the vlan 51 interface? Thanks
0
 
Rick_O_ShayCommented:
No, on the interface for that VLAN should be all you need. And of course the DHCP server needs to be set up with a scope for that subnet.
0
 
Nayyar HH (CCIE RS)Network ArchitectCommented:
I think you'll also need to enable IP on the VLAN51 interface by assigning it an IP address.
You might also need to disable icmp redirects on VLAN51.
VLAN1 and VLAN51 overlap which is invalid - you might need to decide which will host the subnet - 10.255.0.0/16
What problem are you trying to solve?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.