Hi,
   You can use the routes table to setup the routes. 
1. First define a route in the routes table. Make net=0.0.0.0 for default 
gateway.
2. Add the route name for the node attribute.
    chdef <node> routenames="blah"
3. Run command to add the route to the node
    makeroutes <node>
4.  If you want the routes be automatically setup during node deployment, 
add setroute script name to the postscripts.postbootscripts for the node.

Hope it works for you.

Ling


Ling Gao
Poughkeepsie Unix Development Lab
IBM Systems and Technology Group
Internal: T/L 293-5692 
External: [email protected], 845-433-5692

"I never worry about the future. It comes soon enough." --- Albert 
Einstein 



From:   Kilian Cavalotti <[email protected]>
To:     xCAT Users Mailing list <[email protected]>
Date:   02/25/2015 04:48 PM
Subject:        [xcat-user] Setting a default gateway in a network without 
DHCP



Hi all,

I'm trying to define a default gateway which is not in the deployment
network. It's on an external network where xCAT doesn't provide DHCP
services (use case is deploying login nodes directly connected to an
external network). Is that possible?

That node would be deployed through eth1 (on the "internal" network),
but its default gateway should be on its eth0 interface (on the
"public" network). I tried a bunch of things, but I can only end up
with the default gateway defined on the "internal" net.

I have:

# tabdump networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,comments,disable
"internal","10.210.8.0","255.255.255.128","eth1","10.210.8.1","10.210.8.1",,"10.210.8.1",,,"10.210.8.110-10.210.8.119",,,,,"","internal",,
"public","xxx.xxx.xxx.xxx","255.255.255.128","eth0","yyy.yyy.yyy.yyy",,,"8.8.8.8",,,,,,,,,"mydomain.com",,

# lsdef login | egrep "eth0|eth1|public|internal|nic"
    installnic=eth1
    kcmdline=quiet repo=http://!myipfn!:80/install/centos6.6/x86_64
ks=http://!myipfn!:80/install/autoinst/login ksdevice=eth1 cmdline
console=tty0 console=ttyS1,115200n8r
    nicaliases.eth0=login.mydomain.com
    nicips.eth0=xxx.xxx.xxx.xxx
    nicnetworks.eth1=internal
    nicnetworks.eth0=public
    primarynic=eth1
    postscripts=syslog,remoteshell,syncfiles,confignics -sr

The result is:

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
10.210.8.0      0.0.0.0         255.255.255.128 U     0      0        0 
eth1
xxx.xxx.xxx.xxx  0.0.0.0         255.255.255.128 U     0      0        0 
eth0
0.0.0.0         10.210.8.1      0.0.0.0         UG    0      0        0 
eth1

Since there's no mention of gateway anywhere in /etc/sysconfig, I
assume the default gateway comes from DHCP.

So,my question is: is there a way to specify the default gateway?

Thanks!
-- 
Kilian

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, 
sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for 
all
things parallel software development, from weekly thought leadership blogs 
to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to