cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Please be advised, the GuideMe Wizard is no longer available on the Small Business Support Community. For search capability please use the community search field to find content related to Cisco Small Business documents, videos, and discussions.
218
Views
15
Helpful
6
Replies
Beginner

Change Interface configuration

Hello,

      I do not have any experience with Cisco R&S and I have to change the following interface configuration to be 192.168.20.xxx instance of 192.168.5.xxx

Thanks in Advance.

 

interface Vlan1
 ip address 192.168.5.241 255.255.255.0 secondary
 ip address 41.33.214.121 255.255.255.248
 ip nat inside
 ip virtual-reassembly in
 ip tcp adjust-mss 1452
 no autostate
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip nat pool Internet 41.33.214.121 41.33.214.121 netmask 255.255.255.248
ip nat inside source list 5 pool Internet overload
ip nat inside source static 192.168.5.25 41.33.214.122
ip nat inside source static 192.168.5.26 41.33.214.123
ip nat inside source static 192.168.5.27 41.33.214.124
ip nat inside source static 192.168.5.28 41.33.214.125
ip nat inside source static 192.168.5.29 41.33.214.126
ip nat inside source static 192.168.5.30 41.33.214.127
ip route 0.0.0.0 0.0.0.0 172.17.219.245
ip route 192.168.0.0 255.255.0.0 192.168.5.15
ip tacacs source-interface Vlan1
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Change Interface configuration

Hi Abdrhman, and thanks for posting to the forums!

I know the command syntax can be a little confusing and overwhelming when you first start in Cisco, but these should be pretty simple commands to re-write, and I'd be happy to help you out!

It looks like you already have access to the Command Line Interface, so I'll assume you can access to command line and enter the necessary commands. As a side note, this looks like a switch you're trying to re-program. No big deal, but if any of my commands give you trouble I may need to know the make and model of the switch so I can help you get the correct commands. I'll include the most likely set of commands to achieve your desired result here.

Log into the Switch and enter "Enable":

Switch:enable

That will feed you to an almost identical looking screen:

Switch(#):

(Note: You may be prompted for a password here--if you do not have the password, I'll have to help you go through the password recovery process. To do that I'll have to know what kind of switch and what you're using to console in. For now I'll assume you have the password, but don't worry if you don't have it!)

enter the command "Configure Terminal" this will bring you to the global configuration level

Switch(conf):

Now you'll want to first select your interface (vlan 1) and change the ip address as necessary. In this example, I'm going to scrub all the ip addresses (since you have two) and replace them immediately

Switch(conf): interface vlan 1

Switch(conf-int): no ip address

Switch(conf-int): ip address 41.33.214.121 255.255.255.248

Switch(conf-int): ip address 192.168.20.241 255.255.255.0 secondary

switch(conf-int: exit

switch(conf):

That's it for changing the vlan interface ip! not so bad, right? Now you want to change all your NAT rules to match the new interface IP address. Believe it or not, that's even easier. You're going to do it with the following series of commands at the global configuration level. (Note: You can actually copy and paste these commands directly into the CLI. Most hyperterminals will take at least 100 lines at a time, so you can actually copy and paste this entire block in if you'd like)

Switch(conf):

no ip nat inside source static 192.168.5.25 41.33.214.122
no ip nat inside source static 192.168.5.26 41.33.214.123
no ip nat inside source static 192.168.5.27 41.33.214.124
no ip nat inside source static 192.168.5.28 41.33.214.125
no ip nat inside source static 192.168.5.29 41.33.214.126
no ip nat inside source static 192.168.5.30 41.33.214.127
ip nat inside source static 192.168.20.25 41.33.214.122
ip nat inside source static 192.168.20.26 41.33.214.123
ip nat inside source static 192.168.20.27 41.33.214.124
ip nat inside source static 192.168.20.28 41.33.214.125
ip nat inside source static 192.168.20.29 41.33.214.126
ip nat inside source static 192.168.20.30 41.33.214.127

and you should be good to go! No other configuration changes should need to be made.

Let me know if you need any more help programming this switch, or if anything I said was unclear. I'd also be happy to help you recover your password or gain administrative access.

Please rate or mark this post if it has been helpful to you!

Thanks for posting!

-Zac

6 REPLIES 6

Re: Change Interface configuration

Hi Abdrhman, and thanks for posting to the forums!

I know the command syntax can be a little confusing and overwhelming when you first start in Cisco, but these should be pretty simple commands to re-write, and I'd be happy to help you out!

It looks like you already have access to the Command Line Interface, so I'll assume you can access to command line and enter the necessary commands. As a side note, this looks like a switch you're trying to re-program. No big deal, but if any of my commands give you trouble I may need to know the make and model of the switch so I can help you get the correct commands. I'll include the most likely set of commands to achieve your desired result here.

Log into the Switch and enter "Enable":

Switch:enable

That will feed you to an almost identical looking screen:

Switch(#):

(Note: You may be prompted for a password here--if you do not have the password, I'll have to help you go through the password recovery process. To do that I'll have to know what kind of switch and what you're using to console in. For now I'll assume you have the password, but don't worry if you don't have it!)

enter the command "Configure Terminal" this will bring you to the global configuration level

Switch(conf):

Now you'll want to first select your interface (vlan 1) and change the ip address as necessary. In this example, I'm going to scrub all the ip addresses (since you have two) and replace them immediately

Switch(conf): interface vlan 1

Switch(conf-int): no ip address

Switch(conf-int): ip address 41.33.214.121 255.255.255.248

Switch(conf-int): ip address 192.168.20.241 255.255.255.0 secondary

switch(conf-int: exit

switch(conf):

That's it for changing the vlan interface ip! not so bad, right? Now you want to change all your NAT rules to match the new interface IP address. Believe it or not, that's even easier. You're going to do it with the following series of commands at the global configuration level. (Note: You can actually copy and paste these commands directly into the CLI. Most hyperterminals will take at least 100 lines at a time, so you can actually copy and paste this entire block in if you'd like)

Switch(conf):

no ip nat inside source static 192.168.5.25 41.33.214.122
no ip nat inside source static 192.168.5.26 41.33.214.123
no ip nat inside source static 192.168.5.27 41.33.214.124
no ip nat inside source static 192.168.5.28 41.33.214.125
no ip nat inside source static 192.168.5.29 41.33.214.126
no ip nat inside source static 192.168.5.30 41.33.214.127
ip nat inside source static 192.168.20.25 41.33.214.122
ip nat inside source static 192.168.20.26 41.33.214.123
ip nat inside source static 192.168.20.27 41.33.214.124
ip nat inside source static 192.168.20.28 41.33.214.125
ip nat inside source static 192.168.20.29 41.33.214.126
ip nat inside source static 192.168.20.30 41.33.214.127

and you should be good to go! No other configuration changes should need to be made.

Let me know if you need any more help programming this switch, or if anything I said was unclear. I'd also be happy to help you recover your password or gain administrative access.

Please rate or mark this post if it has been helpful to you!

Thanks for posting!

-Zac

Beginner

Re: Change Interface configuration

Hi Zachrhart.

      Thanks a lot and appreciate your help, I will try and update you, but is it will be any different between router and switch, Actually this configuration on the router

 

Re: Change Interface configuration

AbdrhmanTaha,

There should be no difference between the router and switch configurations. I assumed it was a L3 switch because you were programming a logical interface for a vlan (which is most commonly carried out on a switch). The commands should be commands should be exactly the same, though. If you run into any errors, please just post them back up here and I'll help you out.

Thanks! :)

-Zac

Re: Change Interface configuration

Abdrhman,

So sorry! I forgot to tell you how to save your changes once your were done! Once you're done entering your final "nat" command from the sequence I provided, please do the following.

Switch(config): exit

Switch(#): copy run start

[enter]

[enter]

 

This will make sure that your changes stay even once the switch reloads. Sorry I forgot it in the original post. Good luck with your switch.

 

-Zac

Beginner

Re: Change Interface configuration

Thanks Zac, I really appreciate ur help
other question please, I have Sophos XG-210 Firewall act as a gateway for the LAN and it's connected with Cisco router
I'm trying to Create IP Nat on the firewall but it seems something should be done on the router first because when I create the nat in the router it works. ( the gateway in this case, was router ip)

Beginner

Re: Change Interface configuration

There was a conflict between related with the IP and the issue solved after changing the IP range