All of lore.kernel.org
 help / color / mirror / Atom feed
* how to config gateway ?
@ 2016-11-01 13:28 johnzeng
  2016-11-01 13:39 ` [B.A.T.M.A.N.] " Sven Eckelmann
  0 siblings, 1 reply; 4+ messages in thread
From: johnzeng @ 2016-11-01 13:28 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


Hello Dear Sir :

after i succeed to connect hostA to hostB at wifi environment this
afternoon , and i config gateway between hostA and hostB,

i run avahi-autoipd bat0 at two host only ( not run dhcpcd ) and run
batctl gw_mode server and batctl gw_mode server 5mbit/1mbit at hostA,

and run batctl gw_mode client and batctl gw_mode client 20 at hostB


Whether i need config dhcpcd at hostA ? if possible , please give me a
example .

Thanks

---------------------------
HostB status

--------------------------
[root@alarmpi ~]# batctl gwl
Gateway (#/255) Nexthop [outgoingIF]: advertised uplink bandwidth ...
[B.A.T.M.A.N. adv 2015.2, MainIF/MAC: wlan0/c8:3a:35:c9:ce:71 (bat0)]
=> 00:b0:8c:e7:25:3a (248) 00:b0:8c:e7:25:3a [ wlan0]: 5.0/1.0 MBit

[root@alarmpi ~]# batctl gw_mode
client (selection class: 20)

[B.A.T.M.A.N. adv 2015.2, MainIF/MAC: wlan0/c8:3a:35:c9:ce:71 (bat0
BATMAN_IV)]
Originator last-seen (#/255) Nexthop [outgoingIF]: Potential nexthops ...
00:b0:8c:e7:25:3a 0.840s (229) 00:b0:8c:e7:25:3a [ wlan0]:
00:b0:8c:e7:25:3a (229)


---------------------------
HostA status

--------------------------

[root@alarmpi ~]# batctl gw_mode
server (announced bw: 5.0/1.0 MBit)
[root@alarmpi ~]# batctl o
[B.A.T.M.A.N. adv 2015.2, MainIF/MAC: wlan0/00:b0:8c:e7:25:3a (bat0
BATMAN_IV)]
Originator last-seen (#/255) Nexthop [outgoingIF]: Potential nexthops ...
c8:3a:35:c9:ce:71 0.440s (239) c8:3a:35:c9:ce:71 [ wlan0]:
c8:3a:35:c9:ce:71 (239)
[root@alarmpi ~]# batctl gwl
Gateway (#/255) Nexthop [outgoingIF]: advertised uplink bandwidth ...
[B.A.T.M.A.N. adv 2015.2, MainIF/MAC: wlan0/00:b0:8c:e7:25:3a (bat0)]
No gateways in range ..




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] how to config gateway ?
  2016-11-01 13:28 how to config gateway ? johnzeng
@ 2016-11-01 13:39 ` Sven Eckelmann
       [not found]   ` <5818B129.7090509@yahoo.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2016-11-01 13:39 UTC (permalink / raw)
  To: johnzeng; +Cc: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On Dienstag, 1. November 2016 21:28:43 CET johnzeng wrote:
[..]
> i run avahi-autoipd bat0 at two host only ( not run dhcpcd ) and run
> batctl gw_mode server and batctl gw_mode server 5mbit/1mbit at hostA,

batman-adv gateway (mode) is only about filtering DHCP packets from the
client. They will (with enabled gw client mode + reachable gw server)
packets only at the "best" DHCP server. So it will not do anything with
your avahi packets.

The configuration of an DHCP server is not really something for this
mailing list. There is more than one tutorial how to use dnsmasq or
isc-dhcp-server

> and run batctl gw_mode client and batctl gw_mode client 20 at hostB

This will not work. One of the devices has to be the one answering the
DHCP requests (aka the "gw_mode server").

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] how to config gateway ?
       [not found]   ` <5818B129.7090509@yahoo.com>
@ 2016-11-01 15:25     ` Sven Eckelmann
  2016-11-01 15:34       ` johnzeng
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2016-11-01 15:25 UTC (permalink / raw)
  To: johnzeng; +Cc: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

On Dienstag, 1. November 2016 23:13:45 CET johnzeng wrote:
[...]
>                              but i have a question ,   there are two 
> interface bat0( wlan0 and face HostB) and eth0 ( no batman interface and 
> link to internet )  at hostA
> 
>                              echo 1 >/proc/sys/net/ipv4/ip_forward
>                              iptables -t nat -A POSTROUTING -o bat0 -j 
> MASQUERADE

No, masquerading has to be done on the outgoing interface (towards the next
hop which should not see the internal IP addresses - in your example eth0).

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to config gateway ?
  2016-11-01 15:25     ` Sven Eckelmann
@ 2016-11-01 15:34       ` johnzeng
  0 siblings, 0 replies; 4+ messages in thread
From: johnzeng @ 2016-11-01 15:34 UTC (permalink / raw)
  To: Sven Eckelmann; +Cc: b.a.t.m.a.n



Hello Dear Sven :

                              Thanks again and i sloved the problem just 
now .


                               Have a good day with you


                               Best Regards

                               TIger

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-01 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-01 13:28 how to config gateway ? johnzeng
2016-11-01 13:39 ` [B.A.T.M.A.N.] " Sven Eckelmann
     [not found]   ` <5818B129.7090509@yahoo.com>
2016-11-01 15:25     ` Sven Eckelmann
2016-11-01 15:34       ` johnzeng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.