The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Different sized nets?
Author: Jim Hatfield 
Date:   13-12-01 14:02

I was confused about this line:

$IFCONFIG $GIF0 $BSD2_IP $BSD1_IP $NETMASK

Which of the two networks does the netmask apply to? If
the two private networks had different sized netmasks, how
should this be specified?

(to be honest I'm confused about why the gif device is needed at all, but an article in daemonnews said it was to make the routing work properly when using tunnel mode, and there were other ways to do it - but they didn't elaborate on what they were)

Jim

Reply To This Message
 
 Re: Different sized nets?
Author: John Rushford 
Date:   14-12-01 06:30

Greetings,

In my situation we used 192.168.1.x and 192.168.2.x on the private networks. Both private networks have the same netmask, 255.255.255.0 so I only defined one netmask variable and used it in both switches of the case statement. If one has private networks with differing netmasks the script is easily modifable to fit the need.

Keep in mind that the script is executed on both machines as appropriate through the case statement and the netmask determines how to route to the remote network.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org