LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-06-2005, 12:13 PM   #16
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90

Oh... I was wrong.... You do have a masquerade rule.
 
Old 01-06-2005, 12:14 PM   #17
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
So... can you ping using ip addresses?
 
Old 01-06-2005, 12:24 PM   #18
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
from my laptop, i cant ping the gateway ip address, and for sure i can ping my laptop ip address.


what gateway IP address should i set in the laptop?should i choose to use the "Obtain IP address Automatically"??
 
Old 01-06-2005, 12:26 PM   #19
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
i think that is a command where i can see whether there is any packet flow through my Linux box bridge, is it??
what commnad is that???
is it neccessary?
 
Old 01-06-2005, 12:40 PM   #20
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
Your laptop's gateway will be the PCs ip of the interface connected to the laptop..... that is the only IP address available to your laptop to get to the internet.

I'm not sure (because you said AND instead of BUT in your sentence) if you can ping the PC's gateway (that would be the router) from your laptop. Can you?
 
Old 01-06-2005, 12:49 PM   #21
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
Take a look at this thread. It has the main points in a very simple fashion. Perhaps I'm not being clear (or simple) enough:

http://www.linuxquestions.org/questi...hreadid=274625
 
Old 01-06-2005, 12:51 PM   #22
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
The basic setup of a bridge is done like:
Zero IP the interfaces. The bridge needs the network devices to be operational, but without TCP/IP running on them.
# ifconfig eth0 0.0.0.0
# ifconfig eth1 0.0.0.0

Create the bridge interface.
# brctl addbr mybridge
Add interfaces to the bridge.
# brctl addif mybridge eth0
# brctl addif mybridge eth1
Put up the bridge.
# ifconfig mybridge up


so the Pc's eth1 ip address is set to 0.0.0.0
i dont think i can set the gateway ipaddress for my laptop to this IP.

i cant ping the gateway ip for the PC.
 
Old 01-06-2005, 12:58 PM   #23
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
You can't ping the router from your PC (the one you are setting this whole mess into)?
 
Old 01-06-2005, 01:00 PM   #24
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
why i need bridging?
because i want to do this for my project :
http://l7-filter.sourceforge.net/L7-HOWTO-Netfilter

i want to do the bandwidth allocation base on the application layer...
so hope u know why bridging is important for me in making this project success..
 
Old 01-06-2005, 01:03 PM   #25
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
after i set the bridge in my PC(linux box) , i cant ping the router anymore...

root # ping 192.168.0.1
connect: Network is unreachable
 
Old 01-06-2005, 01:07 PM   #26
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
No no... that's not my question. I'm not saying that you shoudn't try bridging.

I'm trying to get you to "debug" the problem.

Let's try to clarify the situation.

You have a router. You have a PC and a laptop. Right?

I'll go on using those names:

PC side
The GW has to be the router's address.
It has to have forward enabled
It has to have masquerading activated in POSTROUTING
It MUST NOT filter the traffic comming in from the laptop.
you should be able to ping your router.
you should be able to ping the laptop.

LAPTOP side
The GW is the PCs address on the interface connected to the laptop.
you should be able to ping the pc (in the first place).
you should be able to ping the router (that depends on the PC configuration).

PS what a mess.

Last edited by eantoranz; 01-06-2005 at 01:09 PM.
 
Old 01-06-2005, 01:23 PM   #27
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
in my PC i try to ping the laptop and router gateway ip address...
but it come this...

root#ping 192.168.0.8
PING 192.168.0.8 56(84) bytes of data.
From 192.l168.0.17 icmp_seq=1 Destination Host Unreachable
...........
...........
.......


root#ping 192.168.0.1
PING 192.168.0.1 56(84) bytes of data.
From 192.l168.0.17 icmp_seq=1 Destination Host Unreachable
...........
...........
.......


192.168.0.1 is my GW IP,
192.168.0.8 is laptop IP address
192.168.0.17 is eth1 IP address
 
Old 01-06-2005, 01:27 PM   #28
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
I see to problems there:

You have set both subnets (the one for eth0 and eth1) at the same segment.

Try using a different segment for them (don't change the one that is connected to the router ). Change the segment of the PC-LAPTOP to 192.168.1.1x

Tell me what happens when you try to ping the laptop afterwards.
 
Old 01-06-2005, 01:41 PM   #29
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
the result is same...

i change eth1 to subnet 1 , ie. 192.168.1.17
then the laptop gateway set to 192.168.1.17

but still cant ping....unreachable
what is the gateway IP for eth 1? same as eth 0 gateway, is it?
what is the IP address for my laptop (using zero subnet or one subnet??) ? i tried both..but also cant...
 
Old 01-06-2005, 01:48 PM   #30
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
One interface doesn't have a gateway... one interface is one interface. A HOST has one (or many) GW(s).

Your pc has a gateway and it is the router. Your laptop has a gw and it is the PC. That is enough to get to the internet.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
WAG54G and Bridging cherif Linux - Networking 5 08-30-2005 06:07 AM
wireless bridging Damon Spector Linux - Wireless Networking 2 03-24-2005 08:12 PM
Bridging connections Infernal211283 Linux - Networking 2 01-20-2005 02:23 AM
Bridging networks alexr186 Linux - Software 0 08-06-2004 06:57 PM
Bridging? JapaneseKamikaz Linux - Networking 0 03-11-2003 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration