Ethernet Switching
Reply
Visitor
tnewnham
Posts: 9
Registered: ‎07-20-2011
0

Setting Switch as Default Gateway

Hello all, 

 

I am working on a project to set one of our three EX3200's as the Default Gateway. The plan is to create two VLAN's on the first switch, one for the uplink (Named INET) on port ge-0/0/0 and second (named SERV) on ports ge-0/0/1 - ge-0/0/47. ge-0/0/44 - ge-0/0/47 will be trunks to the other switches also. 

 

INET will have no IP Address and SERV will be the Gateway. 

 

The other two Switches will have one VLAN across them named WORK (once I perfect the config below, I should be able to handle this one on my own)

 

Here are the questions I need answered:

 

1. Will the config below be good for what I stated above? (If you need more info just ask, I also have a Diagram I can upload if needed)

2. Will the config below route between the VLAN's? If not, what will I need?

3. Once the config is correct, I should just be able to replace the old one with this one in the J-Web CLI Editor correct?

 

Here is the config I made

 

## Last changed: 2012-02-29 11:58:56 CST
version 10.4R1.9;
system {
    host-name switch2;
    time-zone America/Chicago;
    root-authentication {
        encrypted-password "$1$vk/ickXP$r/VNwRojZZY6mE3IF5kQS/";
    }
    login {
        user cssops {
            full-name "Choice Solutions";
            uid 2000;
            class super-user;
            authentication {
                encrypted-password "$1$l2rncAeF$5leG4NPQd0eKKlkWCFaPL0";
            }
        }
    }
    services {
        ssh {
            protocol-version v2;
        }
        netconf {
            ssh;
        }
        web-management {
            http;
        }
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
chassis {
    alarm {
        management-ethernet {
            link-down ignore;
        }
    }
}
interfaces {
    ge-0/0/0 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/1 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/2 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/3 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/4 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/5 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/6 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/7 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/8 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/9 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/10 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/11 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/12 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/13 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/14 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/15 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/16 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/17 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/18 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/19 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/20 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/21 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/22 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/23 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/24 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/25 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/26 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/27 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/28 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/29 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/30 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/31 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/32 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/33 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/34 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/35 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/36 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/37 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/38 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/39 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/40 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/41 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/42 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/43 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/44 {
        unit 0 {
            family ethernet-switching {
                port-mode trunk;
                vlan {
                    members SERV;
                }
            }
        }
    }
    ge-0/0/45 {
        unit 0 {
            family ethernet-switching {
                port-mode trunk;
                vlan {
                    members SERV;
                }
            }
        }
    }
    ge-0/0/46 {
        unit 0 {
            family ethernet-switching {
                port-mode trunk;
                vlan {
                    members SERV;
                }
            }
        }
    }
    ge-0/0/47 {
        unit 0 {
            family ethernet-switching {
                port-mode trunk;
                vlan {
                    members SERV;
                }
            }
        }
    }
    ge-0/1/0 {
        unit 0 {
            family ethernet-switching;
        }
    }
    xe-0/1/0 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/1/1 {
        unit 0 {
            family ethernet-switching;
        }
    }
    xe-0/1/1 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/1/2 {
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/1/3 {
        unit 0 {
            family ethernet-switching;
        }
    }
    vlan {
        unit 0 {
            family inet {
                address 172.16.115.2/24;
            }
        }
    }
}
snmp {
    location Computer_Room;
    contact Tory;
    community pds_private {
        authorization read-only;
    }
}
routing-options {
    static {
        route 0.0.0.0/0 next-hop 172.16.115.1;
    }
}
protocols {
    igmp-snooping {
        vlan all;
    }
    rstp;
    lldp {
        interface all;
    }
    lldp-med {
        interface all;
    }
}
ethernet-switching-options {
    voip;
    storm-control {
        interface all;
    }
}
vlans {
    INET {
        vlan-id 1;
        interface {
            ge-0/0/0.0;
	}
	l3-interface vlan.0;
    }
    SERV {
	vlan-id 2;
	interface {		
            ge-0/0/1.0;
            ge-0/0/2.0;
            ge-0/0/3.0;
            ge-0/0/4.0;
            ge-0/0/5.0;
            ge-0/0/6.0;
            ge-0/0/7.0;
            ge-0/0/8.0;
            ge-0/0/9.0;
            ge-0/0/10.0;
            ge-0/0/11.0;
            ge-0/0/12.0;
            ge-0/0/13.0;
            ge-0/0/14.0;
            ge-0/0/15.0;
            ge-0/0/16.0;
            ge-0/0/17.0;
            ge-0/0/18.0;
            ge-0/0/19.0;
            ge-0/0/20.0;
            ge-0/0/21.0;
            ge-0/0/22.0;
            ge-0/0/23.0;
            ge-0/0/24.0;
            ge-0/0/25.0;
            ge-0/0/26.0;
            ge-0/0/27.0;
            ge-0/0/28.0;
            ge-0/0/29.0;
            ge-0/0/30.0;
            ge-0/0/31.0;
            ge-0/0/32.0;
            ge-0/0/33.0;
            ge-0/0/34.0;
            ge-0/0/35.0;
            ge-0/0/36.0;
            ge-0/0/37.0;
            ge-0/0/38.0;
            ge-0/0/39.0;
            ge-0/0/40.0;
            ge-0/0/41.0;
            ge-0/0/42.0;
            ge-0/0/43.0;
        }
        l3-interface vlan.1;
    }
}
poe {
    interface all;
}

 

 

Thanks in advance! 

Contributor
jackycheung
Posts: 52
Registered: ‎02-02-2010
0

Re: Setting Switch as Default Gateway

Sorry but you've created l3-interface vlan.1 for vlan SERV, but I can't see any configuration of vlan.1?

JNCIP-SP/ENT/SEC
Visitor
tnewnham
Posts: 9
Registered: ‎07-20-2011
0

Re: Setting Switch as Default Gateway

[ Edited ]

I guess I do not understand I thought this was the config for the VLAN itself. I will do some searching around here and learning. 

SERV {
	vlan-id 2;
	interface {		
            ge-0/0/1.0;
                 |
            ge-0/0/43.0;
        }
        l3-interface vlan.1;
    }
}

 

 

EDIT:

 

Alright I think I need to add in whats bolded

 

 

vlan {
       unit 0 {
              family inet {
              }
       unit 1 {
              family inet {
                      address 172.16.115.2/24
       }
}


Super Contributor
nikolay.semov
Posts: 170
Registered: ‎03-15-2012
0

Re: Setting Switch as Default Gateway

if you need to route between VLANs, both vlan interfaces should have an IP address.
Contributor
ed_gpc
Posts: 195
Registered: ‎09-21-2010
0

Re: Setting Switch as Default Gateway

That's correct.  If you have 2 VLANS, you have 2 subnets right?  You wouldn't be able to point a host on subnet 1 to a default gateway that is in subnet 2.  You will need the def gateway on the subnet a hosts to be pointed at the l3 interface on subnet a

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.