cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1076
Views
0
Helpful
4
Replies

SG300-52 assign public IP to device

Geoffrey Diaz
Level 1
Level 1

Hello,

I am trying to assign a public IP address to my PDU which acquires an IP address automatically via DHCP so i can manage remotely. I have tried this with the switch mode in Layer 2 and didn't get it to work so now I'm trying in Layer 3. I have connected the PDU ethernet to the cg300 switch port 2. I created a vlan named vlan 50 and assigned a public IP address we'll call x.x.x.x netmask y.y.y.y

I have given switchport access to port gi2 and associated vlan 50 with gi2. I am thinking I should now be able to ping the switch from my office but the public IP is not pingable. I should also mention the switch is connected at the datacenter where they have the network setup for static routing so setting up DHCP  within my own network is at my discretion. What am I missing? Thank you for any help and suggestions.

switchd0cfa7#show run
config-file-header
switchd0cfa7
v1.4.9.4 / R800_NIK_1_4_205_011
CLI v1.0
set system mode router

file SSD indicator encrypted
@
ssd-control-start
ssd config
ssd file passphrase control unrestricted
no ssd file integrity control
ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0
!
vlan database
vlan 50
exit
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 switchd0cfa7
username cisco password encrypted 1f4x4f6ccae8e9bx653d4e85dxb78x77816f9x1edb privilege 15
!
interface vlan 50
name PDU
ip address x.x.x.x  y.y.y.y
!
interface gigabitethernet2
ip address dhcp
switchport mode general
switchport general allowed vlan add 50 tagged
switchport protected-port
!
exit


switchd0cfa7#show vlan
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,gi3-52,Po1-8 V
50 PDU gi2 S

4 Replies 4

Geoffrey Diaz
Level 1
Level 1

I can also see the MAC Address of the device (PDU) so I know it's connected. I am not sure how to find the IP address it is using. 

 

#show mac-address-table
Vlan Mac Address Port Type
------------ --------------------- ---------- ----------
1 00:06:67:41:15:c1 gi2 dynamic
1 00:23:8b:77:8f:25 gi1 dynamic
1 00:d0:01:77:48:00 gi48 dynamic
1 cc:8e:71:d0:cf:a7 0 self

you need a default router to this public ip address. If you have a default gateway to lan address, your public address wont works well
Jaderson Pessoa
*** Rate All Helpful Responses ***

Hello Jaderson,

Thanks for response. So if I change the default gateway of the vlan or the sg300-52 switch from LAN to WAN (to a public IP)? Is that what you are saying? The sg300 can be set in Layer 3 mode. I have around 30 IP addresses from the datacenter in 4 groups each have different subnets and gateways. Everything appears to work fine through vlan1 just connecting the servers to a port and configuring NIC for IP address. 

I had also wanted to change the switch default-gateway to a public IP so I could access the switch web interface remotely but had trouble configuring that also. I am able to connect through CLI so I can change anything. 


I am just trying to separate the PDU device from the main VLAN 1 and have it pull an IP address that is assigned to the VLAN. Should the VLAN 50 IP address be the default gateway of the IP address I was trying to use? Then create an access list allowing the IP address I am trying to use? 

Does your PDU receive a public ip address through dhcp or statically? Does itself has a gateway configured? (gateway of the ip public range.)
If you just need access your pdu from internet, there are many methods that you can do it.
1. Input a internal ip address on your pdu and create a port forward on your firewall to redirect all traffic on specific ip public to internal ip address of PDU
2. Input a internal ip address on your pdu and create nat 1:1 on your router, firewall e etc. from one public ip address to internal ip address that have in your PDU
3. Create a vlan that has communication with your public address range and insert the ip directly at your PDU. (IP, MASK AND GW).

thats it.
Jaderson Pessoa
*** Rate All Helpful Responses ***