Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Noob qestion , How to configure cables on Gentoo 2004.1
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Fri Aug 27, 2004 6:17 pm    Post subject: Noob qestion , How to configure cables on Gentoo 2004.1 Reply with quote

I've just installed Gentoo 2004.1 with kernel 2.4.25
And I have no clue how to configure my cable modem through ppp-pptp.

Thanks in advance.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Fri Aug 27, 2004 7:12 pm    Post subject: Reply with quote

_nightw0lf,

How is your cable box connected to your PC?
Common ones are USB or Ethernet.

If its USB we will need the ProductID and VendorID, which you can get from /proc/bus/usb/devices
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Deathwing00
Bodhisattva
Bodhisattva


Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Fri Aug 27, 2004 7:17 pm    Post subject: Reply with quote

Moved from Installing Gentoo.

Compile either built-in or as a module the CDC Ether USB driver.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sat Aug 28, 2004 12:29 am    Post subject: Reply with quote

Sorry about that one Deathwing00 , I'm new here :wink:

And I'm using an Ethernet cable connection.
I'm having a script to connect to the internet from my isp

The script contains :
Code:
#!/bin/bash

USERNAME="egrin"
IFACE="eth0"
PPTPS=cable.netvision.net.il

ifdown eth0
ifup eth0

   NVGW=$(host $PPTPS | cut -d" " -f4 | cut -f3 | tail -1)
   CABLEGW=$(ip r l | grep default | cut -d" " -f3)
   
route add -host $NVGW gw $CABLEGW dev $IFACE

./pptp $NVGW debug user $USERNAME mtu 1380 mru 1380 defaultroute persist nobsdcomp usepeerdns

sleep 7

   NEWGW=$(ifconfig ppp0 | grep inet | cut -d":" -f3 | tail -1 | cut -d" " -f1)

route add default gw $NEWGW
route del default gw $CABLEGW

echo nameserver 194.90.1.5 > /etc/resolv.conf
echo nameserver 212.143.212.143 >> /etc/resolv.conf

Now when I execute that , thats what is comming out :

Code:
line 7: ifdown: command not found.
line 8: ifup: command not found.
line 1: host: command not found.
line 1:ip: command not found.
gw: Unknown host
fatal[get_ip_address:pptp.c:236]: gethostbyname: name server error.
ppp0 error fetching interface information
device not found.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sat Aug 28, 2004 7:22 am    Post subject: Reply with quote

_nightw0lf,

First, use /sbin/ifconfig to check that
a) you have an eth0
b) that its your real network card, not ethernet over firewire.
Until you get an eth0 none of the rest of this will work.

Gentoo does not have the ifdown, ifup commands
Use
Code:
/etc/init.d/net.eth0 restart
to achieve the same thing.

The second set of errors come from the ./pptp script, which is probably complaining about something above not being right.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Deathwing00
Bodhisattva
Bodhisattva


Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Sat Aug 28, 2004 8:10 am    Post subject: Reply with quote

Do as NeddySeagoon says. All that is already in the installation guide:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sat Aug 28, 2004 12:45 pm    Post subject: Reply with quote

Well, I can see eth0 in /sbin/ifconfig
And it configured to dhcpd.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sat Aug 28, 2004 1:20 pm    Post subject: Reply with quote

_nightw0lf,

Good.
What happens when you hack your script the way I suggested ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sat Aug 28, 2004 1:42 pm    Post subject: Reply with quote

I should do something about the pptp script thing, need to find a way to hack this too.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sat Aug 28, 2004 1:56 pm    Post subject: Reply with quote

_nightw0lf,

The Point to Point Tunneling Protocol script should work
Whats the problem now?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sat Aug 28, 2004 2:30 pm    Post subject: Reply with quote

This is my script now :
Code:
#!/bin/bash

USERNAME="egrin"
IFACE="eth0"
PPTPS=cable.netvision.net.il

/etc/init.d/net.eth0 restart

   NVGW=$(host $PPTPS | cut -d" " -f4 | cut -f3 | tail -1)
   CABLEGW=$(ip r l | grep default | cut -d" " -f3)
   
route add -host $NVGW gw $CABLEGW dev $IFACE

./pptp $NVGW debug user $USERNAME mtu 1380 mru 1380 defaultroute persist nobsdcomp usepeerdns

sleep 7

   NEWGW=$(ifconfig ppp0 | grep inet | cut -d":" -f3 | tail -1 | cut -d" " -f1)

route add default gw $NEWGW
route del default gw $CABLEGW

echo nameserver 194.90.1.5 > /etc/resolv.conf
echo nameserver 212.143.212.143 >> /etc/resolv.conf

After executing that script.. that is the output:
Code:

*Unmounting network file system     [OK]
*Bringing eth0 down                       [OK]
*Bringing eth0 up                           [OK]
*Mounting network file system         [OK]
./cablestartv.030: line 1: host: command not found.
./cablestartv.030: line 1: ip: command not found.
gw: Unknown host
fatal[get_ip_address:pptp.c:232]: gethostbyname: HOST NOT FOUND.
ppp0: error fetching interface information - Device not found.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sat Aug 28, 2004 2:36 pm    Post subject: Reply with quote

_nightw0lf,

It looks like your ./pptp script is running a script called ./cablestartv.030, or just ./cablestartv and this in turn is trying to execute commands 'host' and 'ip'

Can you post both the pptp and cablestartv scripts please.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sat Aug 28, 2004 2:39 pm    Post subject: Reply with quote

I think the host and ip command that it trying to execute are here:
Code:

   NVGW=$(host $PPTPS | cut -d" " -f4 | cut -f3 | tail -1)
   CABLEGW=$(ip r l | grep default | cut -d" " -f3)
   

Or might be I'm wrong..

And this is the original cablestart.v030 script:
Code:
#!/bin/bash

USERNAME="egrin"
IFACE="eth0"
PPTPS=cable.netvision.net.il

ifdown eth0
ifup eth0

   NVGW=$(host $PPTPS | cut -d" " -f4 | cut -f3 | tail -1)
   CABLEGW=$(ip r l | grep default | cut -d" " -f3)
   
route add -host $NVGW gw $CABLEGW dev $IFACE

./pptp $NVGW debug user $USERNAME mtu 1380 mru 1380 defaultroute persist nobsdcomp usepeerdns

sleep 7

   NEWGW=$(ifconfig ppp0 | grep inet | cut -d":" -f3 | tail -1 | cut -d" " -f1)

route add default gw $NEWGW
route del default gw $CABLEGW

echo nameserver 194.90.1.5 > /etc/resolv.conf
echo nameserver 212.143.212.143 >> /etc/resolv.conf
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sat Aug 28, 2004 3:59 pm    Post subject: Reply with quote

_nightw0lf,

Try this:-
Code:
#!/bin/bash

USERNAME="egrin"
IFACE="eth0"
PPTPS=cable.netvision.net.il

./pptp $(hostname) debug user $USERNAME mtu 1380 mru 1380 defaultroute persist nobsdcomp usepeerdns

sleep 7

   NEWGW=$(ifconfig ppp0 | grep inet | cut -d":" -f3 | tail -1 | cut -d" " -f1)

route del default
route add default gw $NEWGW


echo nameserver 194.90.1.5 > /etc/resolv.conf
echo nameserver 212.143.212.143 >> /etc/resolv.conf

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sat Aug 28, 2004 4:35 pm    Post subject: Reply with quote

I've tried it, this is the outputs:
Code:
fatal[get_ip_address:pptp.c:236]: gethostbyname: name server error
ppp0: error fetching interface information: Device not found.
SIOCADDRT: No such device.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sat Aug 28, 2004 4:46 pm    Post subject: Reply with quote

_nightw0lf,

Have you got PPP installed ?
Code:
emerge ppp -p
if its new, you need to get that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sat Aug 28, 2004 4:53 pm    Post subject: Reply with quote

Yes, I did installed ppp.
Even edited the /etc/ppp/pap-secrets
and added there the user name and password.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sat Aug 28, 2004 5:06 pm    Post subject: Reply with quote

_nightw0lf,

ppp0 didn't come up for some reason, so the system was unable to get the ip address used by ppp0.

The pptp script must bring up ppp0 before it can tunnel over it.

Is there anything useful in your kernel log at /usr/log/<DependsOnLogger/. Beware of your username and password being there in plain text.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sun Aug 29, 2004 7:58 am    Post subject: Reply with quote

I didn't find anything useful in /var/log
But I did found new Netvision Cable script for gentoo. (nvcables-gentoo-0.3.tar.bz2)

It says to copy the nvstart.conf to /etc/conf.d/nvstart
And copy the nvstart.init to /etc/init.d/nvstart

Now after it done to type: rc-update add nvstart default .
ok

nvstart.init
Code:
#!/sbin/runscript
depend() {
        need net
}   

start() {
   ebegin "Starting nvcable-gentoo..."
   [ -n $PPTPS ] || eerror "no \$PPTPS set!" 
   [ -n $USERNAME ] || eerror "no \$USERNAME set!"
   NVGW=$(host $PPTPS | cut -d" " -f4 | cut -f3 | tail -n 1)
   echo $NVGW > /boot/pptp-nvgw
   CABLEGW=$(ip r l | grep default | cut -d" " -f3)
   route add -host $NVGW gw $CABLEGW

pptp $NVGW debug user $USERNAME mtu 1380 mru 1380 defaultroute persist

sleep 7

   NEWGW=$(ifconfig ppp0 | grep inet | cut -d":" -f3 | tail -n 1 | cut -d" " -f1)

route add default gw $NEWGW
route del default gw $CABLEGW
chmod 644 /etc/resolv.conf
}
stop() {
    ebegin   "stoping nvcables-gentoo..."
    ifconfig ppp0 down
    killall pptp
    [ -f /boot/pptp-nvgw ] || eerror "missing /boot/pptp-nvgw!!!"
    CABLEGW=$(ip r l | grep `cat /boot/pptp-nvgw` | cut -d" " -f3)
    route del `cat /boot/pptp-nvgw` gw $CABLEGW
    rm /boot/pptp-nvgw
    sleep 2
    route add default gw $CABLEGW
    dhcpcd -n
}


nvstart.conf
Code:
USERNAME=username
PPTPS=cable.netvision.net.il

#PPTPS - cable.netvision.net.il for netvision
#PPTPS - aztv.012.net.il for 012 internet zahav


I did like the manualy says, And when I start gentoo this is what I get:
Code:
*Starting nvcable-gentoo.......
/sbin/rc: line 1: host: command not found.
/sbin/rc: line 1: ip: command not found.
gw: Unknown host.
anon fatal[get_ip_address:pptp.c:353]: gethostbyname 'debug': HOST NOT FOUND.
ppp0: error fetching interface information: Device not found
Usage: inet_route [-vF] del {-host|-net} Target[/perfix] [gw GW] [metrin M] [[dev] If]


Here is where I've downloaded the script from:
https://sourceforge.net/projects/nvcables-gentoo/
Back to top
View user's profile Send private message
markkuk
Guru
Guru


Joined: 29 Nov 2002
Posts: 446

PostPosted: Sun Aug 29, 2004 9:44 am    Post subject: Reply with quote

The "ip" command is in package sys-apps/iproute2 and "host" is in net-dns/bind-tools.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sun Aug 29, 2004 1:27 pm    Post subject: Reply with quote

to get those packages i need to type emerge sys-app/iproute2
and emerge net-dns/bind-tools?
or is there another path to those packages?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Sun Aug 29, 2004 1:34 pm    Post subject: Reply with quote

_nightw0lf,

Thats right. You can also say
Code:
emerge package1 package2 ...
and emerge will work its way through the list.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sun Aug 29, 2004 1:52 pm    Post subject: Reply with quote

Ok thank you guys, I will try it right away.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sun Aug 29, 2004 3:17 pm    Post subject: Reply with quote

Well I did emerge to iproute2 and it installed it well.
But when I'm trying to install the other package bind-tools
It send me to the internet to download it..
So I've copied the file name " bind-9.2.3.tar.gz " and installed it manually

I did ./configure
make

The first error has disappeared ( the ip : command not found )

And the error with the host thing is still there..

So it seems I didn't install it well,
Anyone know what exactly should I do?

Thanks in advance.
Back to top
View user's profile Send private message
_nightw0lf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2004
Posts: 98
Location: /Israel/home

PostPosted: Sun Aug 29, 2004 10:24 pm    Post subject: Reply with quote

Anyone? :?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum