Need correct BSD syntax for Linux command

Need correct BSD syntax for Linux command

Post by Open Systems In » Thu, 22 Oct 1998 04:00:00





Quote:> Hello,

> I'm running both a Linux box and FreeBSD box.  I'm trying to get to the
> ethernet on
> my BSD laptop using the same command that I used (successfully) under
> Linux.

> The Linux command is:

>     route add default gw xxx.xxx.xxx.xxx eth0

> I assume that the command is saying "if the address you are looking for
> isn't on
> the local network (it never is) go to the gateway with the IP of
> xxx.xxx.xxx.xxx which
> is connected to the first ethernet interface eth0. I did this once under
> SuSE Linux.  The
> /etc/route.conf file was updated so this happens automatically now.  Do
> things work
> similalrly with FreeBSD? One difference is that my PCMCIA ethernet card
> I believe
> is called ep0.

> The route command exists in BSD but the syntax must be different because
> I get
> a failure that says something like "bad address default".  I've tried
> putting the IP
> address that I use under Linux, but it still doesn't work.

Im confused are you trying to configure your ethernet card on your BSD laptop?
If that is the case do the following:

1) edit /etc/rc.conf

 Lets say you have the card ep0 as your ethernet card in your fbsd box.
in rc.conf add "ep0" to the network interfaces line as follows:

network_interfaces="lo0 ep0"

then add a line in rc.conf right below ifconfig_lo0 for your ep0 card as follows

ifconfig_ep0="inet 10.0.0.0 netmask 255.255.255.0"

but of course replace 10.0.0.0 with your IP.

Then edit /etc/resolv.conf and make sure your dns info is in there.

it should contain:

domain  domain.com
ns      nameservers-ip

And then you should be good to go. IF this is what you are trying to do that is.

 
 
 

Need correct BSD syntax for Linux command

Post by Michael Carmod » Fri, 23 Oct 1998 04:00:00


Hello,

I'm running both a Linux box and FreeBSD box.  I'm trying to get to the
ethernet on
my BSD laptop using the same command that I used (successfully) under
Linux.

The Linux command is:

    route add default gw xxx.xxx.xxx.xxx eth0

I assume that the command is saying "if the address you are looking for
isn't on
the local network (it never is) go to the gateway with the IP of
xxx.xxx.xxx.xxx which
is connected to the first ethernet interface eth0. I did this once under
SuSE Linux.  The
/etc/route.conf file was updated so this happens automatically now.  Do
things work
similalrly with FreeBSD? One difference is that my PCMCIA ethernet card
I believe
is called ep0.

The route command exists in BSD but the syntax must be different because
I get
a failure that says something like "bad address default".  I've tried
putting the IP
address that I use under Linux, but it still doesn't work.

Any help would be appreciated.  TIA.

Michael


 
 
 

Need correct BSD syntax for Linux command

Post by Joe Abl » Tue, 27 Oct 1998 04:00:00



>I'm running both a Linux box and FreeBSD box.  I'm trying to get to the
>ethernet on
>my BSD laptop using the same command that I used (successfully) under
>Linux.

>The Linux command is:

>    route add default gw xxx.xxx.xxx.xxx eth0

Have you tried

% man route

--

Network Architect, CLEAR Net          I'm not speaking at all. I'm typing.

 
 
 

Need correct BSD syntax for Linux command

Post by J Wuns » Wed, 28 Oct 1998 04:00:00



> The Linux command is:

>     route add default gw xxx.xxx.xxx.xxx eth0

The BSD command is simpler:

      route add default xxx.xxx.xxx.xxx

No need for the redundant keyword `gw' (an IP address given after the
destination is always assumed to be the gateway's address), and no
need to specify the interface since this is obvious from the gateway
address (you can only specify a gateway address that is actually
reachable directly via one of the interfaces).

Put `xxx.xxx.xxx.xxx' as your default GW into /etc/rc.conf in order to
have it taking effect at next reboot.  Issue the above command to test
it immediately without rebooting.

--
cheers, J"org


Never trust an operating system you don't have sources for. ;-)

 
 
 

1. Syntax of sed command. Correct me please....

Hey all, can someone show me where I'm going wrong?  I know its
something obvious, but I'm completly overlooking it.  Anyway....

I've got a file with about 50 usernames in it.  I've got to use this
to change everyone's passwd entry from /home/username to
/export/home/helpdesk.  So this is what I tried, but its not working:

for names in 'cat names.sed';
do
sed -e "s:/home/$names/:/export/home/helpdesk/:g" users.passwd >>
newlist
done

...Where names.sed is the list of usernames, users.passwd is the
passwd file with their /home/username entries, and newlist would be
the list after the change.

My shell being bourne based (bash), I've tried with several variations
of quotes too (s:/home/"$names":/export/home/helpdesk:g was one of
them), but it doesnt seem to work.  It just copies over the original
users.passwd to newlist without making the variable substitution.

Anyone?

--Dave

2. NetBSD-1.1 and X windows, help plea..

3. Need to know correct syntax for conditional expression

4. PNP driver changes for 2.5.47

5. Translating ARP commands from linux syntax to dos command prompt

6. LILO Help!

7. correct syntax of getsockopt()...Linux

8. Problems with ssh

9. Need help with command syntax for performing a remote cpio restore

10. What is the correct Tape Device name Syntax?

11. whats the correct syntax for a new crontab job?

12. Help!...new BSD Admin...need help w/ command

13. Correct syntax for creating a new user?